IT tutorials
 
Mobile
 

iOS SDK : Application Settings - The Settings Bundle (part 1)

5/3/2013 9:00:25 PM
- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
An application’s preferences are stored in an Extended Markup Language (XML) file called Root.plist. Root.plist is stored in a bundle called Settings.bundle. A settings bundle is not automatically added to your project, and so you must add it to your application if you want to use the Settings application (Figure 1). In addition to Root.plist, a settings bundle can contain any additional .plist files, any images used for sliders, and one or more .lproj files. Additional .plist files are for any child preference panes your application might require. The .lproj files are for localized string resources . You can also store 16 × 16 pixel images you might want to use as the minimumImage and maximumImage on a slider pane in your preference panes.
Figure 1. Adding a settings bundle

Note

You can also specify an icon for your application in the Settings application. Create a 29 × 29 pixel Portable Network Graphics (PNG) image and name it Icon-Settings.png. This file should be placed in your Xcode project’s Resources folder in Groups & Files.


Try This: Creating a Settings Bundle

  1. Create a new View-based Application named MySettings.

  2. Expand the Resources folder and add a new resource file of type Settings Bundle. Accept the default name. Select the Resources group as the place to add the Settings.bundle.

  3. Expand Settings.bundle and click Root.plist (Figure 1). (You may need to display the Utilities pane and change the type of Settings.bundle to Directory instead of Bundle in order to see a disclosure triangle next to it so that you can expand it and select Root .plist.)

  4. Click Run. Tap the Home button to end the application, and tap the Settings application’s icon. The Settings application includes MySettings (Figure 2). Tap the arrow, and Settings displays the MySettings application’s default settings screen (Figure 3).

    Figure 2. Settings application with MySettings

    Figure 3. MySettings application’s settings

Note

To change this example’s title displayed in Settings, change the application’s Bundle Display Name in the MySettings-Info.plist file (Figure 4).


Figure 4. Changing the application’s name
 
Others
 
- Ipad : Your Calendar - Calendar Options - Changing the Default Calendar
- Ipad : Your Calendar - Editing Appointments, Meeting Invitations
- BlackBerry Bold 9700 and 9650 Series : Email Set Up - BlackBerry Enterprise Server Express
- BlackBerry Bold 9700 and 9650 Series : Email Set Up - Set Up or Adjust Email Accounts from Your Computer
- BlackBerry Bold 9700 and 9650 Series : Email Set Up - Troubleshooting Your Email Accounts
- Windows Phone 7 : Building 2D Games with the XNA Framework (part 2) - AlienShooter Game Structure
- Windows Phone 7 : Building 2D Games with the XNA Framework (part 1)
- Android Application Development : Signing and Publishing Your Application (part 2)
- Android Application Development : Signing and Publishing Your Application (part 1)
- iPhone Developer : Assembling Views and Animations - View Hierarchies
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
programming4us programming4us
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS