I'm designing iOS and Android apps full-time for over a year now. A couple of tips from me: - He's very right about previewing on the device. I like xScope better than Silkscreen, because it can stream anything, both file, or screen region, and overall it's a nice designer's utility belt. There's nothing like that for android, at least I haven't found anything that works, and Android needs this even more, because it…
Surprises When Designing An iPhone App
41–50 of 54 posts
Re: Surprises When Designing An iPhone App
#42Re: Surprises When Designing An iPhone App
#43For bolding text, create an attributed string and draw it with CoreText. http://stackoverflow.com/questions/8322020/display-nsattribu... If you only support iOS 6, you can use a UILabel and set the "attributedText" property. I notice a lot of new iOS developers jump to open source libraries to abstract away important frameworks. It might save an hour, but I think it's counterproductive to not do things by hand the fi…
Snippet to take a gray-colored string "Hello World", and then make "World" show as a black color (from memory):
NSString *theEntireLineOfText = @"Hello World";
UIColor *boldColor = [UIColor blackColor];
UIFont *myFont = [UIFont fontWithName:@"Helvetica" size:12.0];
UIColor *baseColor = [UIColor grayColor];
NSDictionary *subAttrs = [NSDictionary dictionaryWithObjectsAndKeys:
myFont, NSFontAttributeName, boldColor,NSForegroundColorAttributeName, nil];
NSMutableAttributedString *mainText = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@",theEntireLineOfText] attributes:@{NSFontAttributeName:myFont,NSForegroundColorAttributeName:baseColor}];
// Make the word "World" black"
NSRange range = NSMakeRange(0,[@"World" length]);
[mainText setAttributes:subAttrs range:range];Re: Surprises When Designing An iPhone App
#44"there must be an iOS equivalent of the tag, right? Apparently not." It's not a silver bullet (it can sometimes give you a bit of a performance hit), but the Nimbus library has a UILabel subclass that makes bolding a substring a lot less painful than manual NSAttributedString munging: http://docs.nimbuskit.info/group___nimbus_attributed_label.h...
Re: Surprises When Designing An iPhone App
#45Earlier quoted context omitted.
You might be interested in something I plan to open source at some point: a native Markdown lexing / parsing engine meant to be used to stylize markdown for Core Text / NSAttributedString. Here's the meat of it in a gist: https://gist.github.com/29dabe4b6e762ee221df
Thanks a lot for the link, I was going to write Markdown -> NSAttributedString library myself, because I couldn't find one. Right now I'm just using DTCoreText and convert Markdown to HTML on the server.
The reason I wrote myself is that my use case was more markdown highlighting than markdown parsing. I needed to preserve the markdown source untouched, which Sundown doesn't support.
Re: Surprises When Designing An iPhone App
#46I'm designing iOS and Android apps full-time for over a year now. A couple of tips from me: - He's very right about previewing on the device. I like xScope better than Silkscreen, because it can stream anything, both file, or screen region, and overall it's a nice designer's utility belt. There's nothing like that for android, at least I haven't found anything that works, and Android needs this even more, because it…
Re: Surprises When Designing An iPhone App
#47Bonus: 1x comps are better sized for clients to view on non-retina screens anyway. I always got complaints showing giant 640px wide mockups…
Re: Surprises When Designing An iPhone App
#48"there must be an iOS equivalent of the tag, right? Apparently not." It's not a silver bullet (it can sometimes give you a bit of a performance hit), but the Nimbus library has a UILabel subclass that makes bolding a substring a lot less painful than manual NSAttributedString munging: http://docs.nimbuskit.info/group___nimbus_attributed_label.h...
Re: Surprises When Designing An iPhone App
#49I'm designing iOS and Android apps full-time for over a year now. A couple of tips from me: - He's very right about previewing on the device. I like xScope better than Silkscreen, because it can stream anything, both file, or screen region, and overall it's a nice designer's utility belt. There's nothing like that for android, at least I haven't found anything that works, and Android needs this even more, because it…
Re: Surprises When Designing An iPhone App
#50Earlier quoted context omitted.
And since it's a closed ecosystem, there's no way for a startup to come along and make the process easier. It all lies on Apple.
Testflight has made it a LOT easier, granted Apple could change things entirely one day and leave them dead in the water. XCode has significantly improved in auto provisioning too, still painful when something breaks, but not as bad as it was.