interface-builder

Xcode 11 add new constraints set zero: use set value instead of default / standard

≯℡__Kan透↙ 提交于 2020-02-26 04:51:02
问题 I used to use autolayout add new constraints to make simple constraints to superview / relative view like this (for loooong time): However, recently after updated to the latest xcode (11.3.3 or just 11.3/11C29), I have this weird issue: when I set the constant = 0, they always generate the constraints in an unwanted way like this: And it seems default value is somehow 20 and making my view look so wrong (0 compared to 20?) If I fix that by edit the constraint like this: Then it'll correct

login page and navigation bar

强颜欢笑 提交于 2020-02-02 13:19:28
问题 When first launching the apps, I want it to show a button to log in. After successfully logged in, I want the app to show a tab bar view.. So does this mean that I need to set my app delegate to point to the UITabBarController? How can I do this? 回答1: I load my UITabBarController in the app delegate, so before adding the login screen the last bit of the applicationDidFinishLaunchingWithOptions looks like this: [window addSubview:tabcontroller.view]; [window makeKeyAndVisible]; To add a view

login page and navigation bar

♀尐吖头ヾ 提交于 2020-02-02 13:18:43
问题 When first launching the apps, I want it to show a button to log in. After successfully logged in, I want the app to show a tab bar view.. So does this mean that I need to set my app delegate to point to the UITabBarController? How can I do this? 回答1: I load my UITabBarController in the app delegate, so before adding the login screen the last bit of the applicationDidFinishLaunchingWithOptions looks like this: [window addSubview:tabcontroller.view]; [window makeKeyAndVisible]; To add a view

login page and navigation bar

生来就可爱ヽ(ⅴ<●) 提交于 2020-02-02 13:18:05
问题 When first launching the apps, I want it to show a button to log in. After successfully logged in, I want the app to show a tab bar view.. So does this mean that I need to set my app delegate to point to the UITabBarController? How can I do this? 回答1: I load my UITabBarController in the app delegate, so before adding the login screen the last bit of the applicationDidFinishLaunchingWithOptions looks like this: [window addSubview:tabcontroller.view]; [window makeKeyAndVisible]; To add a view

iPhone - webViewDidFinishLoad not called

拜拜、爱过 提交于 2020-02-02 07:26:29
问题 I have a simple View into IB that contains just a UIWebView and a UIButton. The webView is retained, connected, not nil, the delegate property os also connected, the Controller is UIWebViewDelegate compliant and set in the .h. in ViewDidLoad, I use [self.webView loadHTMLString:htmlContent baseURL:nil] ; The content loads, but webViewDidFinishLoad is never triggered, neither didFailLoadWithError , neither webViewDidStartLoad . How can I know when my content has finished loading , as it take a

Interface Builder Off Vertically

让人想犯罪 __ 提交于 2020-02-02 07:15:57
问题 I'm using Xcode 4.0 and when building my view in Interface Builder everything looks great. When I run my app with the simulator or iOS device the whole view is off vertically (showing a white bar at bottom). It looks to be off by 20 pixels. TabBar, Labels, Tableview, Text and background image are all shifted up. Any ides? Thanks 回答1: Are you running fullscreen? I'm guessing that you've set the Status Bar to 'None' which means the size of your view in the Interface Builder is wrong. In your

Interface Builder Off Vertically

北城余情 提交于 2020-02-02 07:09:32
问题 I'm using Xcode 4.0 and when building my view in Interface Builder everything looks great. When I run my app with the simulator or iOS device the whole view is off vertically (showing a white bar at bottom). It looks to be off by 20 pixels. TabBar, Labels, Tableview, Text and background image are all shifted up. Any ides? Thanks 回答1: Are you running fullscreen? I'm guessing that you've set the Status Bar to 'None' which means the size of your view in the Interface Builder is wrong. In your

how to embed a xib into storyboard?

╄→гoц情女王★ 提交于 2020-01-25 04:04:59
问题 I'm wandering around to figure out if there's a way to embed a pre-designed xib file into storyboard in Xcode4. Is it possible? Should I do it programmatically? If possible, where can I find a tutorial for it? Thanks in advance! P.S.:: Not nib. It's xib. Sorry. 回答1: no, it's not possible to mix storyboards and nibs/xibs. storyboards are a whole new way of doing things. EDIT: apparently you CAN mix them. i'm not sure where i read that you couldn't. sorry about that. 来源: https://stackoverflow

Constraints to be set for x position

限于喜欢 提交于 2020-01-25 04:01:27
问题 I've a scenario where in I've to display four circles. These should be in center of screen. I tried to place x and top constraint but this doesn't works fine for iPhone 4 device. What constraints should I set so that all four circles should appear in center for all iPhone device? Further, there is UICollectionView in bottom. I tried to set the top, left, w and height but this didn't worked. Any solution? 回答1: 1) Embed your 4 circle in UIView. 2) Set UIView constraint top, fixed width,fixed

InterfaceBuilder NSButton connect to NSViewController Cause “Could not connect action, target class NSObject does not respond to”

依然范特西╮ 提交于 2020-01-24 19:35:16
问题 I have a view-based NSTableView whose "file's owner" is the ViewController . I dragged a button(for deletion) on the custom NSTableCellView , so I want to click the button and delete the current row from tableView, but when add a row the debug console tells me " Could not connect action, target class NSObject does not respond to deleteAction: " I m using the NSArrayController binding the NSTableView(add action is triggered successfully). I also got another weird problem, I try to subclass