uistoryboard

Xcode Storyboard - Where to set UITableViewCell height

瘦欲@ 提交于 2021-02-10 05:48:05
问题 I am using Xcode 7 and I am trying to set the height of a UITableViewCell in the storyboard settings to have a different cell height for different devices (eg. normal and compact x regular). I cannot find a place for these settings. Is this only possible by doing it programmatically? 回答1: Click on Table View after that click on Size Inspector and adjust your cell row height here - Add this below code in your controller class viewDidLoad tableView.estimatedRowHeight = 100.0 // Adjust Primary

Vary for Traits in XCode 8 orientation

南笙酒味 提交于 2021-01-28 05:21:51
问题 I am confused if 'Vary for Traits' is the right thing to define different set of layout constraints for Portrait & Landscape mode on iPhone. My objective is to have different layouts for Portrait & Landscape modes on the iPhone (doesn't matter on iPad). I tried 'Vary for Traits' and define different set of NSLayoutConstraints for Portrait & Landscape modes but it seems to be not working. Basically if I have constraints P1 & P2 active for portrait mode and C1 & C2 for landscape mode for the

How to make Onboarding work with Scene Delegate in iOS13?

丶灬走出姿态 提交于 2020-04-18 12:33:33
问题 I am trying to set up my onboarding screen in the SceneDelegate. When I run the code below, it compiles, but just goes to a black screen. They're many great onboarding tutorials for AppDelegate, but very few for the new SceneDelegate with iOS13. I took this tutorial and tried to apply it to SceneDelegate, but I can't get it to work: https://www.youtube.com/watch?v=y6t1woVd6RQ&t=537s This is my scene delegate code. var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session:

How to make Onboarding work with Scene Delegate in iOS13?

為{幸葍}努か 提交于 2020-04-18 12:32:30
问题 I am trying to set up my onboarding screen in the SceneDelegate. When I run the code below, it compiles, but just goes to a black screen. They're many great onboarding tutorials for AppDelegate, but very few for the new SceneDelegate with iOS13. I took this tutorial and tried to apply it to SceneDelegate, but I can't get it to work: https://www.youtube.com/watch?v=y6t1woVd6RQ&t=537s This is my scene delegate code. var window: UIWindow? func scene(_ scene: UIScene, willConnectTo session:

Applying corner radius to a specific UIView corner inside Storyboard does not work for all corners

倖福魔咒の 提交于 2020-03-02 04:26:27
问题 I made a custom class for this. But it works only for top left corner, not the others: @IBDesignable public class RoundedView: UIView { @IBInspectable public var topLeft: Bool = false @IBInspectable public var topRight: Bool = false @IBInspectable public var bottomLeft: Bool = false @IBInspectable public var bottomRight: Bool = false @IBInspectable public var cornerRadius: Int = 0 public override func awakeFromNib() { var options = UIRectCorner() if topLeft { options = options.union(.topLeft)

Double Tap Segue to move to next storyboard

匆匆过客 提交于 2020-01-24 19:28:49
问题 I am making an app where the user has to double tap a segue to move to the next storyboard, but I cannot find anywhere where it tells you how to do this. Does anyone know how I can achieve this? 回答1: If you do this in Interface Builder with a storyboard: Drag a tap gesture recognizer from the object library onto your view. Make sure the view you dragged it to has "user interaction enabled" checked. Select the tap gesture you added to your scene (which you can find in your document outline on

IB Designables: Failed to render and update auto layout status for Google Maps

做~自己de王妃 提交于 2020-01-21 06:31:09
问题 I'm using GoogleMaps Pod in my project. I have error in one of my Storyboard: error: IB Designables: Failed to render and update auto layout status for MapViewController: dlopen(GoogleMaps.framework, 1): no suitable image found. Did find: GoogleMaps.framework: mach-o, but wrong filetype I have set view class to GMSMapView: App is working on simulator. How I can fix this error? It causes whole storyboard to be blank. 回答1: Use GMSMapView manually by writing code in simulator; Instead of using

Creating a custom UINavigationController in storyboard isn't instantiating the view

ε祈祈猫儿з 提交于 2020-01-16 02:38:19
问题 I have a UIViewController which was created in a storyboard and has been assigned a storyboard id. This UIViewController is instantiated in various places in code and therefor it didn't make sense to create segues from all the different locations. The view controller needs to be contained in a UINavigationController in order to function properly because it uses the various navigation bar items and can push additional view controllers. The view controller is instantiated from code as follows: