Tag: ipad

How to set the title of UIToolBar?

How can I set the title of UIToolBar such that it looks the same as the title in UINavigationBar? I tried to use a button with plain style, it looks ok, but it will be highlighted when I click on it… Is there any better way to set the title in the detail view of […]

Adding Core Data to existing project in XCode 4

I started off the project without Core Data and now I would like to add that functionality to my apps. How do I do this? What additional things does XCode sets up when you actually tick the Use Core Data when you create a new project?

iOS: how to reduce size of large PNG files

I’m currently optimizing my iOS app for the new iPad. Unfortunately by adding launch images for the iPad retina display the size of my ipa grows from 1.2MB to 5.5MB, mainly because of the two PNG images in 1536 x 2008 (portrait) and 2048 x 1496 (landscape). The size of these images are respectivly 1.9MB […]

Popover with ModalPresentationStyle is not centered in iOS 7 iPad

I have a problem with iOS 7 that seems to be a bug or I just don’t do something right. I have modalViewController that appears as a popover on iPad with ModalPresentationStyle. And it is not standard size, custom sized. Here is the code: myViewController *myVC = [[myViewController alloc] init]; UINavigationController *nav = [[UINavigationController alloc] […]

How to stop an UIView animation

I have several UIImageViews within a UIScrollView that I want to wiggle when the user long-presses one of them. So similar to the behavior you get when you long-press an icon in your iPad/iPhone menu. So I have the following: – (void)startWiggling { for (UIImageView *touchView in [scrollView subviews]) { [UIView beginAnimations:@”wiggle” context:nil]; [UIView setAnimationDuration:0.1]; […]

adding bounce effect to appearance of UIImageView

How can I add a bounce effect when I am about to show an UIImageView as a subview? Do I have to use CoreAnimation to do this? My only guess right now is to use CAKeyframeAnimation, please let me know if there’s a better way. Here’s my current code: CABasicAnimation * theAnimation=[CABasicAnimation animationWithKeyPath:@”transform.translation.y”]; theAnimation.delegate = […]

Core Text examples for iPhone/iPad

I am looking for a Core Text example for iphone/ipad but with little luck. Any leads would be appreciated.

Reset scroll on UICollectionView

I have a horizontal UICollectionView which works fine and scrolls. When I tap an item I update my data and call reloadData. This works and the new data is displayed in the UICollectionView. The problem is the scroll position doesn’t change and it is still viewing the last place. I want to reset the scrolling […]

Best practice for setting up an automated build server for iphone apps?

I’m looking to setup an automated nightly build server for our iphone apps, and looking for advice on what works and what doesn’t. Basically, something that at least nightly runs all the unit tests and publishes a new adhoc build to our internal website. All the developers use laptops (which’ll be off overnight), so I’m […]

How to generate all of the numbers of pi in Objective-C

I want to create an iPad application named “Am I in Pi?” to check birthday numbers with Pi numbers and show the numbers. My question is how can I generate all of the million numbers of pi 3.1415…. etc. Is there any library in Objective-C or XML file or function that I can use for […]