Category Archives: iOS development

iOS development relative

Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil

Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil   Symptom: Normal but crash in iOS 7 device. Possible reason : Use some “Baseline” constraints (Only supported after iOS 8) in storyboard. Solution : Remove any “Baseline” constraints of that … Continue reading

Posted in iOS development | Leave a comment

XCode SVN is not under version control

That is the keyword I Googled for solution and no luck. I’m too old to learn new source control mechanism like Git so I stuck on SVN with XCode. It works perfect usually but sometimes it show “xxx is not … Continue reading

Posted in iOS development | Tagged , , , , , , | Leave a comment

Custom URL schemes practice

Let’s define something in this scenario : 1.Receiver app – to be invoked via custom URL 2.Sender app – who wants to invoke the app 3.Custom URL scheme – define as “happygo”     For Receiver app, here’s what to … Continue reading

Posted in iOS development | Leave a comment

iOS Watchkit Development – paired device unavailable for development

I had this problem twice, I googled the same article to do the same actions to fix. Here I wrote down to remember myself. Error : “paired device unavailable for development” showed in XCode when new to Apple Watch Fix … Continue reading

Posted in iOS development | 3 Comments

Icon only UITabbar, no title at all.

1.Clear the title attribute to empty. 2.Set the Image Insect attribute of the Tabbar item as follow And you’re good to go. Happy Tabbaring…

Posted in iOS development | Leave a comment

Set UITabbar tintColor via StoryBoard

I found that it’s really weird to set UITabbar tintColor. It won’t work if you change the Tint attribute in the View section. You have to add the attribute by yourself to make it work. Check this out. Happy Tabbaring … Continue reading

Posted in iOS development | Leave a comment

UILabel 動態高度 Dynamic Height

UITableViewCell 有 heightForRowAtIndexPath 可以指定 但是實務上總是會碰到客戶的要求:「動態列高」 若是「想以文字內容決定 UILabel 的高度」 可以使用下面的程式 先用「文字,字型和寬度」(這點要事先決定,不然沒辦法算)計算出 UILabel 的高度 然後再用這個算出來的高度去 initWithFrame 搞定,收工放飯   +(float) getHeightForText:(NSString*) text withFont:(UIFont*) font andWidth:(float)width { CGSize constraint = CGSizeMake(width , 20000.0f); CGSize title_size; float totalHeight; SEL selector = @selector(boundingRectWithSize:options:attributes:context:); if ([text respondsToSelector:selector]) … Continue reading

Posted in iOS development | Leave a comment