uistoryboard

Why aren't my custom classes appearing in the dropdown in Interface Builder?

回眸只為那壹抹淺笑 提交于 2019-12-20 06:13:42
问题 I am using Interface Builder and Storyboards to build my app. I am trying to connect my source code to my UIViewController in Storyboard, but none of my classes show up in the Custom Class dropdown menu. This is occurring in Xcode 11 beta 2 and Xcode 11 beta 4. I've tried some solutions in this Stack Overflow answer, but they are not working. I've already done all of the following: Relaunched Xcode Deleted derived data Reinstalled Xcode Tried a different Storyboard Recreated the

Can a viewcontroller access the identifier of an incoming segue?

爱⌒轻易说出口 提交于 2019-12-20 05:39:20
问题 Can a viewcontroller access the identifier of the segue that was used to transition to it? For example, I transition from viewcontroller A to viewcontroller B using a segue with the identifier "mySegue". Is there anyway for viewcontroller B to get the segue's identifier? 回答1: I don't believe there is such a property. This kind of thing should be handled via the calling VC's prepareForSegue:sender method (as said in the comments) and then assigning a custom property to denote where it came

Swift: SKSpriteKit, using Storyboards, UIViewController and UIButton to set in game parameters?

五迷三道 提交于 2019-12-20 04:38:44
问题 Context The default code that comes with a new SpriteKit game has a storyboard such that - following the launch screen - all there is, is a GameViewController which calls forth the GameScene . However, this may be less ideal for many games. For example, one may wish to have the user select difficulty from a main menu, and then go to the GameScene - outlined below: Notably, the middle view controller is a custom class MyUIViewController so that the UIButtons "easy" and "hard" can have the

Xcode 4.3 how to merge storyboard changes from two developers using SVN?

五迷三道 提交于 2019-12-19 17:40:17
问题 I'm running into an issue where a project has multiple developers working on the same storyboard file. As developers add controllers to their own version of the storyboard, the files need to be merged. As I look at a storyboard in plain text format during merge, I can't make sense of what changes I should accept and in which order. Is there some sort of tutorial or a guideline on how to do merge changes from versions of the same storyboard? How do you manage changes to the same storyboard

How to pass data from one View to other view in IOS using UIStoryboard segues?

倾然丶 夕夏残阳落幕 提交于 2019-12-19 10:44:12
问题 I am using Xcode 4.3.1 . I have created the UI using Storyboard which has many View Controllers. Issue In my app i am using ShakeGesture. While shaking i am doing some operations, its working fine. But, when shaking get stopped i need to pass some values to another View controller to display it. I have seen many post it says how to pass value when button clicked,but no one related with my problem. It would be great if you solve my issue My question is How to pass values from one View to

Using float values in storyboard

删除回忆录丶 提交于 2019-12-19 10:29:10
问题 I want to to assign a float value to a UIButtons frame in Storyboard. But I can only use int values. Is it discouraged to use .5 for example? because I have some buttons and I want to place them according to the original photoshop design. for example I have a button I need to be placed at X:151 , how can I achieve that? 回答1: Do NOT use a float value. As you have rightly observed, Interface Builder prevents this; but you should not do it even in code. Just the opposite: when you assign a frame

UIStoryboard load from app delegate

风格不统一 提交于 2019-12-19 05:17:38
问题 I am trying to load a UIStoryboard from the app delegate .m in this way: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIStoryboard *storybord = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:[NSBundle mainBundle]]; UIViewController *vc =[storybord instantiateInitialViewController]; [self.window addSubview:vc.view]; return YES; } What is the problem with this code?? any idea? 回答1: - (BOOL)application:

Setting a UITableView's contentInset through Storyboard in Xcode 6

半城伤御伤魂 提交于 2019-12-19 05:13:09
问题 On Xcode 6, it seems that the ability to set the content inset of a scroll view/table view through UIStoryboard has been taken away. See image below: the parameters on the left are from Xcode 6, whereas the parameters on the right are from Xcode 5 Does anyone know if the parameters have moved, or are we no longer able to set the content inset through UIStoryboard? I'd really like to keep this out of my code if possible.. 回答1: You can do that by using KVC Select table view Choose Identity

segue transition with condition storyboard

狂风中的少年 提交于 2019-12-19 05:01:28
问题 I am new to storyboard and xcode (using 4.4) I would like to implement a login condition, that if accomplished - the segue would work. Otherwise, the user should stay on the same view. I created 2 UIView: ViewController and Bar Controller. I also created a segue from ViewController to Bar Controller and set its identifier to loginSegue as modal. In LoginViewController.m I added the following: - (IBAction)login:(id)sender { self.email = self.emailText.text; self.password = self.passwordText

Xcode 4.5 storyboard crashing

≯℡__Kan透↙ 提交于 2019-12-19 04:38:16
问题 Very often when I try to edit UILabels in storyboard, Xcode is crashing. Any ideas what could be causing this? It looks like it has something to do with one of the autolayout constraints. Here's the error report: Process: Xcode [43938] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 4.5 (1839) Build Info: IDEApplication-1839000000000000~3 App Item ID: 497799835 App External ID: 10747437 Code Type: X86-64 (Native) Parent Process: launchd [43283] Date