10 Implementing iOS-specific components and APIs
This chapter covers
- Strategies for effectively targeting platform-specific code
- Using the picker components,
DatePickerIOS
, andPickerIOS
- Showing loading progress using
ProgressViewIOS
- Choosing views using
SegmentedControlIOS
andTabBarIOS
- Calling and choosing items in an action sheet using
ActionSheetIOS
One of the end goals of the React Native project is to have a minimal amount of platform-specific logic and code. Most APIs can be built so the platform-specific code is abstracted away by the framework, giving you a single way to interact with them and easily create cross-platform functionality.
Unfortunately, there will always be platform-specific APIs that can’t be completely abstracted away using an approach that makes sense cross-platform. Therefore, you’ll need to use at least a handful of platform-specific APIs and components. In this chapter, we cover iOS-specific APIs and components, discuss their props and methods, and create examples that mimic functionality and logic that will get you up to speed quickly.