Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 95

LevensGardener
Aspiring developer
Profile
Posts: 220
Reg: Sep 30, 2012
Kendal
10,450
02/22/13 02:08 AM (12 years ago)

Notepad plugin- white on black

I'm using the notepad plugin on iOS which is great, but would like to change it so the text is white on a black background to match in with the styling for the rest of the app. I assume assume this is a small tweek to the .m file, but I'm no coder and am not sure what to touch. I'd appreciate a pointer... Thank you. Chris
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
02/22/13 02:29 AM (12 years ago)
I don't have this plugin but it may be easy for you to do this. Can you change the text colour or background in the control panel. If not do a search for [UIColor blackColor] and [UIColor whiteColor] in the .m file. It could also be in hexadicaml #000000 or #FFFFFF or RGB red 0.0/255.0 green 0.0/255.0 blue 0.00/255.0 , red 255.0/255.0 green 255.0/255.0 blue 255.0/255.0 I'm sure the code has written descriptions by it. Make them the opposite way around.
 
LevensGardener
Aspiring developer
Profile
Posts: 220
Reg: Sep 30, 2012
Kendal
10,450
like
02/22/13 02:39 AM (12 years ago)
Thanks Kittsy, That has changed the screen to black, but now what do I alter to get the text I add to show up as white? Sorry to distract you :) Chris
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
02/22/13 02:50 AM (12 years ago)
look for something along the lines of textfield.text = [UIColor blackColor]; I'm guessing the text is used using a textfield itt could be a label. But your looking for the above. Now as standard text is black that code may not be there so you may have to create it. So you would be substituting textfield for the name of the the textfield name. copy and paste in your post the properties from the .h file. Blind coding at it's finest lol
 
LevensGardener
Aspiring developer
Profile
Posts: 220
Reg: Sep 30, 2012
Kendal
10,450
like
02/22/13 03:24 AM (12 years ago)
You will make a coder of me yet Kittsy! Here are the lines in the .m where I changed the UIColor. That worked great, but no sign of 'textfield.text' in the code. //create UITextView self.textViewNotes = [[UITextView alloc] initWithFrame:CGRectMake(0, textTop, textWidth, textHeight)]; [self.textViewNotes setEditable:FALSE]; [self.textViewNotes setDelegate:self]; [self.textViewNotes setKeyboardType:UIKeyboardTypeDefault]; [self.textViewNotes setReturnKeyType:UIReturnKeyDefault]; [self.textViewNotes setBackgroundColor:[UIColor blackColor]]; [self.textViewNotes setFont:[UIFont systemFontOfSize:15]]; [self.textViewNotes setScrollEnabled:true]; [self.textViewNotes setAutocorrectionType:UITextAutocorrectionTypeNo]; [self.textViewNotes setAutocapitalizationType:UITextAutocorrectionTypeNo]; self.textViewNotes.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth); Maybe there is a parameter in setFont that could be used? Chris
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
02/22/13 03:33 AM (12 years ago)
the textfield is a Textview which is textViewNotes so This should work textViewNotes [self.textViewNotes setTextColor:[UIColor whiteColor]]; or textViewNotes.textColor = [UIColor whiteColor]
 
LevensGardener
Aspiring developer
Profile
Posts: 220
Reg: Sep 30, 2012
Kendal
10,450
like
02/22/13 03:41 AM (12 years ago)
Bingo! That did the trick. Kittsy, you are a genius and a gentleman. This is unbeatable customer support- and it isn't even your plugin!!!! Interestingly, the reason why I was looking for black backgrounds throughout the app is that I am using your wonderful carousel menus, and they look stunningly gorgeous with reflections over black. Thanks again. Chris
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
02/22/13 03:47 AM (12 years ago)
No probs happy to help. your right reflections look amazing over the black. Go further change the font swap [self.textViewNotes setFont:[UIFont systemFontOfSize:15]]; to [self.textViewNotes setFont:[UIFont fontWithName:@"ArialMT" size:15]]; suitable ios fonts at www.iosfonts.com
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.