xcode-storyboard

performSegueWithIdentifier vs instantiateViewControllerWithIdentifier

我的未来我决定 提交于 2019-11-27 11:42:21
问题 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 not find a storyboard named 'MainStoryBoard' in bundle NSBundle

こ雲淡風輕ζ 提交于 2019-11-27 11:39:32
I have started a new app a few days ago and began working with the simulator to test it. I started as an empty project and manually added the storyboard. The simulator builds and runs my app just fine but when I try to build to my iPhone I get the messsage ' Could not find a storyboard named 'MainStoryBoard' in bundle NSBundle '. Google turned up nothing and this question suggested I checked my target for the storyboard, but everything is in place. Even so, if something wouldn't be in place, the simulator wouldn't run either. Can anyone point me in the right direction? The simulator is not

Advantages and disadvantages of using Storyboarding? [closed]

大憨熊 提交于 2019-11-27 11:13:54
问题 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? 回答1: Advantages of

Modify UIImage renderingMode from a storyboard/xib file

笑着哭i 提交于 2019-11-27 10:42:53
Is it possible to modify a UIImage 's renderingMode from a storyboard or xib editor? The goal is to apply tintColor to the particular UIImageView object. Snowman Here's how you can do it in .xib or storyboard files: (Obj-C) Create a category on UIImageView : @interface UIImageView (Utils) - (void)setImageRenderingMode:(UIImageRenderingMode)renderMode; @end @implementation UIImageView (Utils) - (void)setImageRenderingMode:(UIImageRenderingMode)renderMode { NSAssert(self.image, @"Image must be set before setting rendering mode"); self.image = [self.image imageWithRenderingMode:renderMode]; }

How can I rearrange views when autorotating with autolayout?

a 夏天 提交于 2019-11-27 05:19:30
问题 I frequently run into this problem where I want my views arranged in one manner for portrait and a somewhat drastically different manner for landscape. For a simplified example, consider the following: Portrait: Landscape: Notice how in portrait the images are stacked vertically, but in landscape, they are side-by-side? Of course, I can manually calculate the positions and sizes, but for more complicated views, this quickly becomes complex. Plus, I'd prefer to use Autolayout so there's less

Could not find a storyboard named 'MainStoryBoard' in bundle NSBundle

喜欢而已 提交于 2019-11-27 04:03:18
问题 I have started a new app a few days ago and began working with the simulator to test it. I started as an empty project and manually added the storyboard. The simulator builds and runs my app just fine but when I try to build to my iPhone I get the messsage ' Could not find a storyboard named 'MainStoryBoard' in bundle NSBundle '. Google turned up nothing and this question suggested I checked my target for the storyboard, but everything is in place. Even so, if something wouldn't be in place,

UISplitViewController on iPad with Storyboards?

ε祈祈猫儿з 提交于 2019-11-27 02:54:56
问题 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

Xcode 8 GM seed Storyboard layout issue

孤街醉人 提交于 2019-11-27 01:37:12
问题 I've tried XCode 8 GM seed and I've found out a serious issue in the Storyboard, either you use Auto Layout or disable it, Xcode 8 messes up with a UIView included into a UIScrollView , as shown here: The wired thing is that if I resize that embedded UIView into the ScrollView , quit Xcode and open my project again, that UIView gets bigger again, with no sense, all the times. Have you encountered the same issue? Do you think Apple fix this big bug with the Official release of XCode 8? Thanks!

XCode Storyboard merging

依然范特西╮ 提交于 2019-11-27 01:12:14
问题 Is there a way to merge XCode 4.2 Storyboard files? I'm working with another developer on an iPhone project and all my attempts at merging changes into a storyboard file have met with failure and after which Xcode is no longer able to load the storyboard. Consequently I have to do an svn revert and then redo my modifications. 回答1: Here's the only tool I've ever come across which lets you merge storyboards: https://github.com/marcinolawski/StoryboardMerge 来源: https://stackoverflow.com

Unable to connect IBOutlet from storyboard to UIView subclass

∥☆過路亽.° 提交于 2019-11-26 22:53:27
问题 I am able to right-click and drag from my custom UIView subclass file to the storyboard elements to connect them, but unable to do so the other way around. I believe this is an Xcode bug. Is there anything that I can do to fix this? This is not the first time that it happen already and its annoying. I already tried cleaning and restarting Xcode several times with no luck. This does not work (Right clicking from the storyboard to Swift file) This works (Right clicking from swift file's