Using Styles for iOS: Multi-Resolution Styles, and the Black and Transparent Styles
Go Up to Creating an iOS App
This topic describes how to use the Black and Transparent FireMonkey styles for iOS devices of every screen resolution (Retina or non-Retina).
Using the Multi-Resolution FireMonkey iOS Styles
For iOS 7, iOS 8, and iOS 9, we include user interface styles inside the IDE that are automatically bundled into your compiled application. In addition, you can find iOSBlack.fsf and iOSTransparent.fsf themed styles in the \styles\iOS folder that is installed with the product:
You can load these styles and apply them to your application by using the TStyleBook component. These styles are available only for iOS. The styles automatically support the current screen resolutions (that is, 1x or 2x) without any code or IDE changes on your part.
On iPhone/iPad, for iOSBlack.fsf and iOSTransparent.fsf styles, either the non-Retina (1x), Retina (2x) or Retina HD (3x) style is loaded, depending on the device. For example, an app running on iPhone 6 has the Retina (2x) resolution, and Retina HD (3x) resolution on iPhone 6 Plus respectively.
Gray Default Style for iOS Applications
For iOS 7, iOS 8, and iOS 9 applications, the default style is the Gray style for iPhone/iPad apps.
On some specific iPhone devices, at design time, you may see a Blue style. However, at run time, you always see the Gray style.
The following steps demonstrate the run-time difference in the same Tabbed Multi-Device Application when run on iPad and on iPhone:
- Create a new application by selecting either File > New > Multi-Device Application - Object Pascal or File > New > Multi-Device Application - C++.
- Choose Tabbed Multi-Device Application type.
- Set iOS Simulator (iPhone) as the target platform in the Project Manager.
- On the iOS Simulator, select Hardware > Device > iPhone.
- Run the app on the iOS Simulator.
- Set iOS Simulator (iPad) as the target platform in the Project Manager.
- On the iOS Simulator, select Hardware > Device > iPad.
- Run the project on the iOS Simulator.
- Working with Native and Custom FireMonkey Styles
- Applying FireMonkey Styles
- Customizing FireMonkey Applications with Styles
- Using Styles Defined by Components in Design-Time Packages Installed in the IDE
- Form Designer
- Creating an iOS App
- FireMonkey 3D Overview
- Mac OS X Application Development