Monthly Archives: July 2013

View rotation methods

View rotation methods for iOS5 and iOS6


Segue – prepareForSegue

Make sure to give the segue an ID so that it can be found. In this example the segue ID would be “mySegueID”.



XCode – Size and designation iOS icons (Icon Sizes and Names) for iPhone and iPad

Device / Screen File Name (PNG) Icon Size (pixels)
iPhone and iPod
Application Icon for iPhone (retina display) Icon@2x.png 114 x 114
Application Icon icon for iPhone Icon.png 57 x 57
Settings / Spotlight icon for iPhone (retina display) Icon-Small@2x.png 58 x 58
Settings / Spotlight icon for iPhone Icon-Small.png 29 x 29
Launch image Portrait (retina display) Default@2x.png 640 x 960
Launch image Portrait Default.png 320 x 480
iPhone 5
IPhone 5 Launch image for Portrait (retina display) Default-568h@2x.png 640 x 1136
Application Icon for the new iPad (retina display) Icon-72@2x.png 144 x 144
Application Icon for the iPad Icon-72.png 72 x 72
Settings / Spotlight icon for iPad Icon-Small-50@2x.png 100 x 100
Settings / Spotlight icon for iPad Icon-Small-50.png 50 x 50
Launch image Portrait (retina display) Default-Portrait@2x.png 1536 x 2008
Launch image Portrait Default-Portrait.png 768 x 1004
Launch image Landscape (retina display) Default-Landscape@2x.png 2048 x 1496
Launch image Landscape Default-Landscape.png 1024 x 748
iTunes App Store
App icon for the App Store (retina display) iTunesArtwork@2x.png 1024 x 1024
App icon for the App Store iTunesArtwork.png 512 x 512

NSNotificationCenter – post and listen for a notification

In your first view controller (where you need to be notified of some event) you implement code to register and remove notification.

Now with the code above in place in your first view controller you will simply call it whenever you need it with this line of code which posts the notification:


Xcode – convert iPhone storyboard to iPad storyboard

How to convert an iPhone storyboard into an iPad storyboard:

Also see this answer — to convert an iPhone storyboard to an iPad storyboard, do the following:

  1. From Xcode, right-click on the storyboard and choose Open As → Source code
  2. Search for targetRuntime=”iOS.CocoaTouch” and change it to targetRuntime=”iOS.CocoaTouch.iPad”
  3. Right-click on the storyboard again and choose Open As → iOS Storyboard

The storyboard will now show all views in the correct size.