Equivalent of fragment(android) in iOS
Want to know if there is a way to use some view controllers within a view controller which provides the same functionality as fragments in android ?
I want to use custom so do not want to use TabViewController,SplitViewController etc.
- Make the application restart by itself on a jailbroken device
- Required code signature missing for a library
- Console error “CGAffineTransformInvert: singular matrix” in UIWebView
- Add a floating bar to a scroll view like in the Facebook iOS app's timeline
- how to do dynamic BarChart Plotting in swift
- viewDidLoad called before prepareForSegue finishes
2 Solutions Collect From Internet About “Equivalent of fragment(android) in iOS”
Container View Controllers allow to include child view controller inside another view controller. Take a look at the docs by clicking on the “more…” link in the class overview.
Implementing a Container View Controller
A custom UIViewController subclass can also act as a container view controller. A container view controller manages the presentation of content of other view controllers it owns, also known as its child view controllers. A child’s view can be presented as-is or in conjunction with views owned by the container view controller….
Using them in storyboards is as simple as dragging the Container View to your view controller.
And Xcode will automatically add a child view controller to it
here in iOS we have some thing called
please refer to the link below apple documentation
This may help you to over come fragments like in android.
- applyForce(0, 400) – SpriteKit inconsistency
- Play Video in Background using Avplayer
- What Does a Swift Data Type of “L” Stand For?
- Can you override between extensions in Swift or not? (Compiler seems confused!)
- How to determine if one array contains all elements of another array in Swift?
- Add cell to bottom of UITableView in iOS
- Where to download an slightly older iOS SDK?
- Swift: load images Async in UITableViewCell
- QRCode Scanner Not Working in iOS 11, only showing camera preview
- Why Does String Not Equal What Is Stored?
- Programmatically turn on/off wifi on real iOS device with UI Automation
- (lldb) Run time Error on Xcode
- How to save a uiimageview on top of another uiimageview (swift3)
- Cocoapods staying on “analyzing dependencies”
- Is it better to write 0.0, 0.0f or .0f instead of simple 0 for supposed float or double values