xcode-storyboard

How to override trait collection for initial UIViewController? (with Storyboard)

吃可爱长大的小学妹 提交于 2019-11-29 02:54:28
问题 I have an app targeted iOS8 and initial view controller is UISplitViewController. I use storyboard, so that it kindly instantiate everything for me. Because of my design I need SplitViewController to show both master and detail views in portrait mode on iPhone. So I am looking for a way to override trait collection for this UISplitViewController. I found that I can use override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator:

Setting backgroundColor of custom NSView

你。 提交于 2019-11-29 00:23:50
问题 What is the process of drawing to NSView using storyboards for osx? I have added a NSView to the NSViewController. Then, I added a few constraints and an outlet. Next, I added some code to change the color: import Cocoa class ViewController: NSViewController { @IBOutlet var box: NSView! override func viewDidLoad() { super.viewDidLoad() } override func viewWillAppear() { box.layer?.backgroundColor = NSColor.blueColor().CGColor //box.layer?.setNeedsDisplay() } override var representedObject:

Height of contentView of UIScrollView based on inside content using Storyboard

偶尔善良 提交于 2019-11-28 20:34:10
问题 I'm actually facing difficulties to make my UIScrollView fully responsive using only storyboard constraints . Here is my hierarchy : > - UIViewController > - UIView > - UIScrollView > - contentView > - module1View > - module2View > - module3View All the modules are used to display charts. I want them to be responsive . I want their width to be 100% of the screen and their height is defined by a ratio added using constraint. The modules are displayed next to each other like news in a newsfeed.

performSegueWithIdentifier vs instantiateViewControllerWithIdentifier

旧时模样 提交于 2019-11-28 18:51:04
I don't seem to get this SIGABRT I keep getting. I have this storyboard iOS application, and in the storyboard I have a UITableViewController. Now, I can take a cell of the TVC and make it push the "segue" view controller, but what if I needed to stop the "segue" action on certain conditions? Apparently you can't, since the prepareForSegue:sender: method doesn't allow for it, and it seems to be the only callback that gets called when a transition is about to get performed. So I guessed I could go into the tableView:didSelectRowAtIndexPath: and perform the segue programmatically. Suboptimal,

Size class to identify iPhone 6 and iPhone 6 plus portrait

大城市里の小女人 提交于 2019-11-28 18:47:59
How to uniquely identify iPhone 6 and iPhone 6 plus portrait screens using size classes? My App looks good in iPhone 4 and iPhone 5 but the same looks with lots of empty spaces in iPhone 6 and 6 plus because of screen sizes. Though am using auto layout i can't increase the font size or view size only for iPhone 6 and 6 plus alone. I knew that we can change the font size and view size using size classes. but in my case don't know what to do. Am using xCode 6.1 and my app supports from iOS 7 to latest iOS 8.1. Am expecting solution only in storyboards as am doing my UI designs fully in

Advantages and disadvantages of using Storyboarding? [closed]

一个人想着一个人 提交于 2019-11-28 18:19:14
I've been writing iOS apps for a while now and gradually went from doing the UI entirely programmatically to using the Interface Builder intensively. I'm now thinking about using the new Storyboarding feature for some of my new projects, but I don't have enough experience or knowledge with it to calculate the advantages and disadvantages of doing so. Can anybody give some examples or information about when using Storyboarding payed off and when it was a waste of time? Advantages of Storyboarding It's cool - suave way to design interfaces Use of StoryBoardSegues to identify navigation/modal

Xcode storyboard: Internal error. Please file a bug

♀尐吖头ヾ 提交于 2019-11-28 16:47:32
While editing in the storyboard, specifically assigning a view controller to a specific class, I suddenly encountered this error when I wanted to run the project. Main.storyboard: Internal error. Please file a bug at bugreport.apple.com and attach "/var/folders/79/_jh611t15qsfcx165_jv_20h0000gn/T/IB-agent-diagnostics_2015-10-28_00-33-12_730000". And now I can't run my project anymore. I couldn't find any information regarding to this anywhere else. Did anyone encounter this before? I faced the same issue. And it was solved by cleaning up the build files. cmd + shift + k AND cmd + option +

start position of table view is wrong in simulator, and is not the same in storyboard

浪子不回头ぞ 提交于 2019-11-28 12:58:13
I created a tableview in storyboard, which looks good, but the start position is wrong in the simulator or device. The 'Label' should not be at the same position as the time. How could I solve it?? Simulated metrics are just that. Simulated. They're useful to set to how the view will actually display in order to help set up the look in the storyboard, but whether or not a navbar or tabbar shows up in the actual program is irrelevant to whether or not you've selected it as a simulated metric on the storyboard. In this case, you're probably using constraints, and setting the label's y origin to

Dynamic UITableViewCell content does not expand cell

丶灬走出姿态 提交于 2019-11-28 10:36:03
问题 I have a storyboard with several different types of prototype cells with UILabels containing dynamic data. In my storyboard, the cell looks like this: The UILabel's Lines property is set to zero to allow multiple lines of text. It is pinned to the top, left, right of the content view and to the nearest neighbor on the bottom (the blue line). The blue line is pinned to the left and right of the content view and to the UILabel at the top, and the UITextView at the bottom.The UITextView is

UISplitViewController on iPad with Storyboards?

倖福魔咒の 提交于 2019-11-28 09:27:31
In Xcode, how can I create a simple iPad application that uses Storyboards such that the DetailView controller is swapped out for each entry? Most examples that I've seen use the iPhone or they simply change the values in the same detail view controller. I want to create the segues in Interface Builder from a static TableView Controller (with say 3 rows) where each row will load a different game detail view controller, which I would drag out and design in IB. Currently, when I connect a view controller with a segue, it replaces the navigation part of the UISplitViewController. In other words,