Hacker News new | past | comments | ask | show | jobs | submit login
Animate in Xcode without code (canvaspod.io)
51 points by jamztang on Dec 5, 2013 | hide | past | favorite | 19 comments



Never tried that component, but not being able to set a custom font for a text view is such an obvious miss for an OS that claims to be so much text oriented. I can't count the number of times i've had to bind a UILabel into my code just to set the font.

I know, UIApparence should be the way to set fonts everywhere, but that defeat the purpose of rapid prototyping IB is made for.


You may want to check the release notes of the latest iOS/Xcode beta.

(but yes, I agree, that it has taken this long is crazy)


There's a third party plugin for Xcode claims to do this called MoarFonts and asked you for $10, however I have not tried that. Runtime attributes patch wouldn't take effect instantly in IB but it works reliably well in our experience.


Link to MoarFonts: http://pitaya.ch/moarfonts/


> not being able to set a custom font for a text view is such an obvious miss

Can't you just use an attributed string? Xcode lets you pick a font using the standard system font picker then.


Thanks, we'll add that in the next commit. I wish there was an easier way than having to cover all of those objects.


Subclass UILabel and set it in the initializer?


User defined runtime attributes in IB are great. We use them for font name and other handy things (like CALayer attributes for corner radius, shadows, etc).

A word of caution, though. Using key paths in your categories like "fontName" is pretty dangerous. Apple could add such a property, or your users could already have one on their object, that would cause problems. I would suggest including a prefix or suffix, e.g. "cvs_fontName" similar to three-letter-prefixing.

I'll second the mention about checking the release notes of the latest iOS/Xcode beta, for those who have access. Moarfonts seemed promising, but caused nothing but problems when we tried it.


For anyone building the sample project getting _vImage related compiler errors, link Accelerate.framework.

I can't figure out why that's an issue though — URBImageMediaViewController (dependency where the error comes from)'s sample project doesn't link against Accelerate.framework either, but it builds fine.


Hey Max, are you talking about the Ripple demo or the Canvas one? I'll definitely look into that. :)


Hey :)

Canvas one.


Ok, will look into it!


Does it work on Landscape iPad? Some of the new iOS7 animation APIs have odd issues on that orientation.


Nice work. Keeping animation in the presentation-layer makes sense for 90% of the projects.

Any reason for the iOS 7 requirement?


There are so much awesome APIs on iOS 7 that we planned to leverage in the future, cutting off legacy platforms simply help us focus on looking ahead instead of backwards.


At first glance, it appears to be doing a lot of UIKIt Dynamics stuff, and that only came to 7.


Using the new keyframe animation API by the looks of things.


Yes it's using the keyframe APIs, it might be more like an experimental code style for now, but we will keep revising to make it better.


This looks pretty awesome. Excited to give it a try.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: