With the release of iOS 9 this week, there’s some changes to the development of the application.
If you are writing an app now and it calls certain external api or webservices, you will hit the following error.
The resources could not be loaded because the App Transport Security policy requires the use of a secure connection.
There are 2 solutions to this, first make sure that the connection you are trying to make support
https. Change that in your codes and build, if error persist.
The second solution is to add a new value to the Info.plist in your solution file.
Add a Key called
NSAppTransportSecurity as a
Add a sub-key called
and set its value to
This is continuation from
We have previously created the Storyboard, now we need to configure some settings.
RootViewController.h – Add the following codes
@interface RootViewController : RESideMenu <RESideMenuDelegate
RootViewController.m – Add the following codes - (void)awakeFromNib
self.menuPreferredStatusBarStyle = UIStatusBarStyleLightContent;
self.contentViewShadowColor = [UIColor blackColor];
self.contentViewShadowOffset = CGSizeMake(0, 0);
self.contentViewShadowOpacity = 0.6;
self.contentViewShadowRadius = 12;
self.contentViewShadowEnabled = YES;
self.contentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"contentViewController"];
self.leftMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"left"];
self.backgroundImage = [UIImage imageNamed:@"Stars"];
self.delegate = self;
#pragma mark -
#pragma mark RESideMenu Delegate
- (void)sideMenu:(RESideMenu *)sideMenu willShowMenuViewController:(UIViewController *)menuViewController
NSLog(@"willShowMenuViewController: %@", NSStringFromClass([menuViewController class]));
- (void)sideMenu:(RESideMenu *)sideMenu didShowMenuViewController:(UIViewController *)menuViewController
NSLog(@"didShowMenuViewController: %@", NSStringFromClass([menuViewController class]));
- (void)sideMenu:(RESideMenu *)sideMenu willHideMenuViewController:(UIViewController *)menuViewController
NSLog(@"willHideMenuViewController: %@", NSStringFromClass([menuViewController class]));
- (void)sideMenu:(RESideMenu *)sideMenu didHideMenuViewController:(UIViewController *)menuViewController
NSLog(@"didHideMenuViewController: %@", NSStringFromClass([menuViewController class]));
Take note of the leftMenuViewController in the awakeFromNib method. We going to set those identifier to our storyboard’s viewcontroller.
Storyboard – RootViewController
Set the class to RootViewController.
Storyboard – NavigationViewController
Set the StoryboardID to
Storyboard – HomeViewController
Set both the Class and Storyboard ID.
2. Now add a UIBarItem to your navigation.
3. Link the UIBarItem with the presentLeftMenuAction.
Now you are good to test! Ping me up if you have issue.
In this tutorial, we are going to cover some of the quick and easy way of adding a side menu to your iOS app.
Firstly, let me introduce you to
http://www.cocoacontrols.com, this is repository that provides a bunch of custom controls that are designed for iOS and Mac OSx. Sometimes we should not reinvent the wheel, but harness the power of the internet and community around.
Next, we are going use cocoa pods, if you are not sure what that is, head over to the following url ->
Raywenderlich’s intro to cocoapod
So I have choose, RESideMenu, an amazing and beautiful control.
GitHub – RESideMenu.
Getting Started – Adding RESideMenu to your project
Adding the library into your project, if you have a pod file add the following:
pod 'RESideMenu', '~> 4.0.7'
Within your Terminal, browse to your XCode project location and type the following:
Xcode should generate a xcworkspace extension for you. Moving forward you should be only using this file.
Getting RESideMenu to work
Let create the following files in your project.
RootViewController – Add New File -> Cocoa Touch Class
HomeController – Add New File -> Cocoa Touch Class
The above should inherit UIViewController.
Next in your Main.Storyboard, add the following:
It should look like below after you are done.
In the next post, I am going to show you what we need to configure.
This article will cover the basic of adding the Three20 framework to your Xcode 4 solutions.
A little background of this particular framework, quoting from the source.
Three20 is a open source Objective-C library used by dozens of well-known brands in the App Store, including Facebook, Posterous, Pulse, Meetup.com, and SCVNGR. Three20 provides powerful view controllers such as the Launcher, the popular Photo Browser, and internet-aware tables.
Another post will be written to discuss about the features of the framework, Three20. But for now let’s us get started on adding this the Three20 to your Xcode 4 project.
Three20 source code could be downloaded from the following link.
I do strongly suggest that you download the tar.gz version.
Start by extracting the content of the file you downloaded from the site.
Again, I suggest that you should extract the file on the desktop.
Locate the file
at that paticularly path ttmodule.py
xcode4 three20 facebook Open Terminal,
Enter: python Drag
into the terminal window, ttmodule.py
Enter: -p Locate your xcode project, Drag the
file into the Terminal. .xcodeproj
Enter: Three20 Check that the Terminal Window should now look something like this
> python /Users/xxx/Desktop/three20/src/scripts/ttmodule.py -p /TestingProject/TestingProject.xcodeproj Three20
This will add the Three20 framework into the xcode project and you can find out more on how to use the following at the following site.
I was searching for a good community control for the popoverviewcontroller seen on the ipad.
I present to everyone, .
It was so simple to get started with the above and you can remove the complexity in the developing customize UI and get along with your actual development work.
Steps to get it working.
1. Add the following files
2. Add the following codes in your IBAction event.
ViewController *content = [self.storyboard instantiateViewControllerWithIdentifier:@"home"];
FPPopoverController *popover = [[FPPopoverController alloc] initWithViewController:content];
popover.arrowDirection = FPPopoverNoArrow;
[popover presentPopoverFromPoint:CGPointMake(self.view.center.x, self.view.center.y - popover.contentSize.height/2)];
Lastly, do check out the demo included in the git checkout!
[UIPopoverController initWithContentViewController:] called when not running under UIUserInterfaceIdiomPad.’
I finally got time to start working on some weekend IOS project and I am starting to get rusty with my IOS language.
Started one of my older project and tried to get going but hit an error i thought was pretty base.
Basically this error is associated with the UIPopoverController and you are running the simulator in iPhone mode and not in iPad mode.
Hope that helps anyone who face the same issue.
PCH file built from a different branch ((clang-425.0.24)) than the compiler ((clang-425.0.27))
Getting the above mention error when building an IOS app.
Solution: Do a clean on your solution in Xcode and try to build again that should resolve the issue.
The above issue with XCode 4.5.
On IOS 5 SDK with Xcode 4.5, you will notice the following error.
Continue reading “The NIB data is invalid on dequeueReusableCellWithIdentifier”
Today I am going to discuss about adding a checkbox in the UITableView.
If you are not aware, Xcode provide you with a fair bit of controls out of the box but checkbox is missing!
This post will teach you, how to implement one the simple way.
Continue reading “UIButton within UITableViewCell. (CheckBox)”
So I have worked with Xcode’s Storyboard for awhile now, most of the work are done with a design template that have Storyboard already in.
Just the other night, I tried creating a Single View Application and try to implement a push via segue on it and was thrown with the following:
Terminating app due to uncaught exception ‘NSGenericException’, reason: ‘Push segues can only be used when the source controller is managed by an instance of UINavigationController.’
Bear in mind that with the various option available on Storyboard,
modal will work fine but not push.
For push to work, you will need a UINavigationController. In doing so you can just drag a UINavigationController onto the Storyboard and make sure that you set it as the start of the application.