storyboard

Objective C - One storyboard for iPad and iPhone

谁说胖子不能爱 提交于 2019-12-18 15:57:22
问题 I just want to know if it is possible for an iPad and iPhone application to share the same storyboard? I currently have 2 storyboards, one for iPad and one for iPhone. Is it possible to have both devices running form the same storyboard? Regards, EZFrag 回答1: If your iPhone and iPad has same views, then this is possible, the views you create in your iPhone will stretch to fill the iPad screen, however this is not recommended since iPad has bigger screen you should create different views with

Multiple storyboards on one property

萝らか妹 提交于 2019-12-18 15:52:06
问题 I have multiple storyboards that access the same property (not at the same time). After one storyboard changed the property, the other one seems to have no access to it and does not change anything.. What can I do against this? Sample: <ListBox> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> <Border Name="Border" BorderBrush="DarkGray" BorderThickness="1" Margin="3">

Add a navigation bar to a view without a navigation controller

不想你离开。 提交于 2019-12-18 14:39:07
问题 I have a side menu that slides out to display a table view and from there I have segues that use the reveal view controller. The segue has to connect directly to the view controller; I can't use a navigation controller. How do I add a navigation bar with a bar button item without a navigation controller? 回答1: While there are several smart ways to answer your question. I just solved it programmatically and wrote the following code in my viewWillAppear (note - viewDidLoad is also okay, but not

How to add a dropdown menu to the Navigation Bar Title in iOS

心已入冬 提交于 2019-12-18 13:08:28
问题 I want to make something similar to the dropdown menu in these screenshots. How would I go about doing that? When you tap the title, the arrow points up and a menu drops down. The App Is College Menus. 回答1: There are lots of cocoacontrols to perform this function in your app: DropDown Menu Controls For iOS But I think lmdropdownview is the most accurate. My mistake, btnavigationdropdownmenu ITS the most accurate for what you are asking (according to your screens). Implementation (Swift)[See

Multiple entry points to a storyboard

好久不见. 提交于 2019-12-18 12:43:03
问题 I need to make a set of decisions in the AppDelegate on launch - depending on the outcome of those decisions I need to go to specific parts of the storyboard. So my question is - WITHOUT using any nav or tab controllers, how do I go to a specific part of a storyboard? OR Is the only supported option having multiple storyboards - for each of the 'outcomes' and then loading those as required? Thanks 回答1: Give each of your ViewControllers a separate ID, and then instantiate the required one with

How to resolve the Storyboard's warnings on Xcode? [duplicate]

孤街醉人 提交于 2019-12-18 12:38:58
问题 This question already has answers here : Xcode 9 - “Fixed Width Constraints May Cause Clipping” and Other Localization Warnings (13 answers) Closed 2 years ago . Trailing(Leading) constraint is missing, which may cause overlapping with other views My storyboard: (just put 2 labels and their constraints) What is the best way to avoid these warnings? 回答1: Give Trailing to Hello, Label with World! label like below image give Constant 8 (What minimum gap you need) to Trailing constraint and

Extracting nibs/xibs from storyboards (iOS)

本小妞迷上赌 提交于 2019-12-18 12:14:44
问题 I have created a simple project with a storyboard, and now realize that they don't support iOS 4.x and that I would like users with these devices to be able to download my app. The app is just a flipside view controller, and is fairly simple but if there's a way to just extract the XIBs from the storyboard I'd much prefer to do that than recreate it. tl;dr: getting .xibs out of a .storyboard? 回答1: Xib files cannot be extracted from the storyboard but you can instantiate UIViewControllers out

Why won't UIScrollView scroll fully after adding objects? Using storyboard, ARC, and Xcode 4.5.2

蓝咒 提交于 2019-12-18 12:04:04
问题 So, I know there are similar questions to mine, but maybe not exact (so please don't mark me down -- just warn me or something). I have searched for days for the solution to this SIMPLE issue. Using storyboards, ARC, and Xcode 4.5.2, I simply need to put a bunch of labels inside a UIScrollView and have it scroll vertically. I've tried so many combinations of setting frame sizes and content sizes within viewDidLoad, viewDidAppear, and viewWillAppear, but to no avail. The scroll view scrolls

How to change bottom layout constraint in iOS, Swift

做~自己de王妃 提交于 2019-12-18 11:54:00
问题 I have scroll view as @IBOutlet @IBOutlet weak var mainScrollView: UIScrollView! I want to change the "Bottom space to: Bottom Layout Guide" constraint programmatically. First Item : Bottom Layout Guide.Top Relation : Equal Second Item: Scroll View.Bottom Constant: 0 -> 50 // (I want to change this programmatically) Priority: 1000 Multiplier: 1 How can I do this? 回答1: Take the constraint as IBOutlet of NSLayoutConstraint . Set the constraint outlets and change constant value by : self

Xcode 5 - Storyboard - Has no constraints

随声附和 提交于 2019-12-18 11:47:02
问题 Does anyone know why I get the following message: "The selected views have no constraints. At build time explicit left, top, width, and height constraints will be generated for the view." I'm using XCode 5 - Storyboard with AutoLayout turned on 回答1: Found the solution! Select the ViewController then from the XCode menu: Editor --> Resolve Auto Layout issues --> Add missing constraints in View Controller 回答2: It appears that in Xcode 5.1 when using AutoLayout, when you create a new scene it