Tag Archives: iPhone
iOS Navigation Bar behind status bar after closing full screen MPMoviePlayer
I had a problem with an iOS app I am creating. I have a view that has a UINavigationBar at the top and a table view that displays a full screen video on didselectrowatindexpath. Once the video is playing if the device is rotated and the done button is pressed the video will disappear but the […]
iOS – Check if wifi is being used
In an app I was making recently I wanted to check if the user was using a wifi connection. I used the method below to check and just checked whether it returned true or false. – (BOOL)networkCheck{ Reachability *currentReachability = [[Reachability reachabilityForInternetConnection] retain]; NetworkStatus networkStatus = [currentReachability currentReachabilityStatus]; [currentReachability release]; switch (networkStatus) { case NotReachable: […]
Upgrading iPhone apps to run full screen on iPhone 5
As you probably know already, the iPhone 5 is taller than the previous iPhone 4S and iPhone 4. When I first heard about the change is size my first thought was how long is it going to take to update all my apps to work on these devices. Turns out that so far it hasn’t […]
ShareKit 0.2.1 Twitter not working
I added ShareKit to my project and got the following error: Twitter Send Status Error: {"error":"Could not authenticate with OAuth.","request":"\/1\/statuses\/update.json"}Twitter Send Status Error: {"error":"Could not authenticate with OAuth.","request":"\/1\/statuses\/update.json"} The following is how I fixed it: Around line 54 you will see the following code: self.authorizeURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/authorize"]; self.requestURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/request_token"]; self.accessURL = [NSURL […]
NGTabBarController for iOS
A custom TabBarController which can be positioned on the bottom, top, left or top. Utilizes iOS 5 Containment API if possible, but works on iOS 4 too. The TabBar is fully customizable with a tintColor or background image as well as the possibility to show/hide the item highlight and the possibility to change the text […]
iOS Launch Images
When creating a new universal IOS app you need to create a minimum of 6 launch images to support the iPhone and iPad (both including their retina displays). For the iPhone you have it easy, only 2 are required. Default.png – 320 x 480 Default@2x.png – 640 x 960 For the iPad there are a […]
How to fix “duplicate symbol _OBJC_METACLASS_$” iPhone
I got this error while working on my latest iPhone app: duplicate symbol _OBJC_METACLASS_$ Turns out that after adding an NSManagedObject subclass for a Core Data entity I moved the files into a group (to make the files look neater). When I generated them again after updating the entity it create 2 sets of the files […]
Move UITextFields when keyboard opens in iPhone app
While working on my latest app, I was looking for a solution to slide the screen up when the keyboard opens so that text fields aren’t hidden by it. I came across this one: TPKeyboardAvoiding its a very simple drop in component. You copy a couple classes into your existing project, put all your elements into […]
How to change colour of UINavigationBar
By default the UINavigationBar on an iOS app is blue. Apple have some built-in styles that you can use [self.navigationController.navigationBar setBarStyle:UIBarStyleBlackOpaque];[self.navigationController.navigationBar setBarStyle:UIBarStyleBlackOpaque]; The options available are: UIBarStyleBlack UIBarStyleBlackOpaque UIBarStyleBlackTranslucent UIBarStyleDefault *UIBarStyleBlackOpaque and UIBarStyleTranslucent have been depreciated. You should use UIBarStyleBlack and set property ‘translucent’ to yes if needed*. You can also change the colour to […]
PullToRefresh iOS
Maybe a bit late to the table but this plugin is so easy to use but makes a huge difference to an app. It takes a couple minutes to get it working in an app so no reason not to use it if you need a way of refreshing a uitableview https://github.com/enormego/EGOTableViewPullRefresh