Updating constraints on the storyboard can be easy with these tips:
Enjoy this info? Visit my Patreon page to support educators and artists.
My YouTube Channel
Need help with SwiftUI? Check out my products at: Big Mountain Studio Website
Showing posts with label storyboard. Show all posts
Showing posts with label storyboard. Show all posts
Monday, March 27, 2017
Saturday, February 18, 2017
Storyboard Tips - Use Command Equals to Resize to Fit (iOS, Xcode 8)
One of my favorite storyboard tips - using Command + Equals (=) to resize a control to fit the text.
Thursday, February 9, 2017
Storyboard Tips - Command Drag (iOS, Xcode 8, Swift 3)
Hold down COMMAND key while dragging an object on the Storyboard so it will not drop inside other UIViews.
Tuesday, October 11, 2016
Table Headers and Footers
Drag and drop UIViews on to a UITableView on the storyboard.
Tip: Add a prototype cell to the table view first. Then drag and drop the UIView above the prototype cell for a header or below the prototype cell for the footer.
You can then remove the prototype cell after you are done adding the header and/or footer.
(Xcode 8, Swift 3.0)
Tip: Add a prototype cell to the table view first. Then drag and drop the UIView above the prototype cell for a header or below the prototype cell for the footer.
You can then remove the prototype cell after you are done adding the header and/or footer.
(Xcode 8, Swift 3.0)
Saturday, June 4, 2016
Modal Popups on iPhone
The way to achieve the look of a modal popup on the iPhone lies in the settings of the Storyboard Segue from the view controller that will be triggering the popup to the view controller that contains the popup.
I choose Cross Dissolve for the Transition so the popup doesn't slide into view but materializes into view on top instead.
You can do all this in just one view controller but I did it this way to reuse the popup in many view controllers and I like the simplicity of it.
For the modal popup view controller I will sometimes add a blur effect or a view with a lowered alpha property so you can still see the underlying screen a little and then put the content in a smaller size.
Here is an example:
(Xcode 8)
I choose Cross Dissolve for the Transition so the popup doesn't slide into view but materializes into view on top instead.
You can do all this in just one view controller but I did it this way to reuse the popup in many view controllers and I like the simplicity of it.
For the modal popup view controller I will sometimes add a blur effect or a view with a lowered alpha property so you can still see the underlying screen a little and then put the content in a smaller size.
Here is an example:
View Hierarchy
If you don't get the right view hierarchy, the transition will be messed up.Wrong Way
Right Way
Close the Popup
Finally I want the user to be able to touch anywhere off the popup to dismiss it. This can be done by adding a Tap Gesture Recognizer or a button with no text to cover the whole screen below the popup's view.(Xcode 8)
Navigation
Here are some ways to programmatically control navigation.
In order to find your view controllers by identifier you will have to first set the identifier (after selecting it on the storyboard):
(Swift 2.2)
In order to find your view controllers by identifier you will have to first set the identifier (after selecting it on the storyboard):
With NavigationController
// Navigate to another view controller
let vc = storyboard?.instantiateViewControllerWithIdentifier("myViewController")
navigationController?.pushViewController(vc!, animated: true)
// Go to previous view controller
dismissViewControllerAnimated(true, completion: nil)
// Go to the starting view controller
navigationController?.popToRootViewControllerAnimated(true)
Without NavigationController
// Navigate to another view controller
let vc = storyboard?.instantiateViewControllerWithIdentifier("myViewController")
present(vc!, animated: true, completion: nil)
// Go to previous view controller
dismissViewControllerAnimated(true, completion: nil)
With Segue
// Navigate to another view controller // You have to give your Segue an identifier to use this performSegue(withIdentifier: "mySegue", sender: self)
(Swift 2.2)
Subscribe to:
Posts (Atom)
SwiftUI Search & Filter with Combine - Part 3 (iOS, Xcode 13, SwiftUI, 2...
In part 3 of the Searchable video series, I show you how to use Combine in #SwiftUI for the search and filter logic connected to the searcha...
-
This post visually shows the stack view's Alignment and Distribution property settings. There is also a section on resolving auto layou...
-
I couldn't find a tutorial on this so this is my documented journey into trying to figure out how to implement OAuthSwift into an iOS p...
-
I had someone ask about aligning text within a TextField view and I didn't have a page in my book for this but added one just now. ...




