uistoryboard

iOS 7: Misplaced View Frame for “Label - Label” will be different at run time

微笑、不失礼 提交于 2019-11-28 15:57:44
问题 I just finished an app on iOS 6 and bought a developer account a week ago so haven't had much time playing with the iOS 7 SDK. Just downloaded the Golden Master version and trying to upgrade my app to be compatible with iOS 7. I received a lot of warnings saying Misplaced View Frame for "Label - Label" will be different at run time. and I am unable to run the program. The project contains tableview and its is parsing and displaying XML feed from an RSS. How to fix this issue? 回答1: I had the

Using stretchable images in Xcode storyboards

泪湿孤枕 提交于 2019-11-28 14:38:19
问题 I'm using storyboards to layout my view controllers and I would like to use stretchable images for my buttons (so that I don't need to generate several images with different sizes). Is this possible to do directly in storyboards without writing any code? I'm really liking the possibility to use storyboards for all graphic stuff and keep the code clean from UI stuff, but it seems like I can't get away with it here. If it is not possible, what would you suggest otherwise? 回答1: Update for iOS 7+

Segue crashes my program. Has something to do with my NavigationController and my TabBarViewController

丶灬走出姿态 提交于 2019-11-28 14:32:05
I encountered a problem while testing my app. You can see how I have setup my views in the following image: The thing is that everything works fine. I user my test user to login, and the following code executes the loginSegue, self.performSegueWithIdentifier("loginSegue", sender: self) which is a modal segue that links my login "View Controller" with the "Home Tab Bar View Controller". I get redirected to the "Initial Feed View Controller". Everything works great. But when I go to my "Settings View Controller", and click on the Logout button, which has the following code (IBAction): @IBAction

Selecting different storyboards based on device type

て烟熏妆下的殇ゞ 提交于 2019-11-28 13:22:56
I have a universal app in which I'm loading my main storyboard manually in application:didFinishLaunchingWithOptions . I have 2 storyboards for iPhone and iPad which have the ~iPhone and ~iPad suffixes. I'm loading my storyboard using: UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; self.initialViewController = [storyboard instantiateInitialViewController]; This prints Unknown class ViewController in Interface Builder file. to the console, so apparently it's not loading the correct storyboard. However, when I use [UIStoryboard storyboardWithName:@

Passing Data between View Controllers : from uitableview to a details view controller

冷暖自知 提交于 2019-11-28 13:12:40
I am using IOS 5 and Storyboard coding. I have built an application in which i have a tableView connected to a sqlite database with a search bar. When we touch a row, it will take us automatically to another view controller called "Details". I need to pass data from my table view to the details view controller, pass for example the author.title to the labelText.text field. Any ideas? Edited question: - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ // NSString *Title; Details *dv = (Details*)segue.destinationViewController; author.title = dv.labelText.text; } Partial code:

Could not load NIB in bundle: 'NSBundle when using storyboarding

烈酒焚心 提交于 2019-11-28 11:57:32
I am getting the following error when I use my app for a little while. Usually takes between 50 and 100 movements to cause the crash. I am not making sense of it though as I am using storyboards, and it is a NIB error. Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/me/Library/Application Support/iPhone Simulator/5.0/Applications/GUID/appname.app> (loaded)' with name 'MainStoryboard_iPhone.storyboardc/q8p-MH-tsT-view-acD-hJ-g0C'' I am not 100% sure where to begin looking, but I assume that this means that

Swipe to go back only works on edge of screen?

送分小仙女□ 提交于 2019-11-28 11:51:10
My swipe to go back feature works but only works on the edge of the screen. How can I have it work from anywhere on the screen? Apple says here : interactivePopGestureRecognizer The gesture recognizer responsible for popping the top view controller off the navigation stack. (read-only) @property(nonatomic, readonly) UIGestureRecognizer *interactivePopGestureRecognizer The navigation controller installs this gesture recognizer on its view and uses it to pop the topmost view controller off the navigation stack. You can use this property to retrieve the gesture recognizer and tie it to the

Share the same UI for two subclasses in Obj-C/Storyboard

末鹿安然 提交于 2019-11-28 11:07:48
问题 I have a ViewControllerA , and its UI layout is designed in the Interface Builder (storyboard). ViewControllerA has two concrete subclasses, ViewControllerB1 and ViewControllerB2 ; they have the same UI with its superclass ViewControllerA , but run with different logic. How can I create two different concrete classes but they share the same UI with storyboard in which you must indicate the view controller's class? 回答1: Unfortunately storyboard doesn't support subclassing. You should create

label disappear when changing font size to 25 in Swift

守給你的承諾、 提交于 2019-11-28 11:01:40
问题 I have a table view and two labels inside it. The second label(description label) has Hundreds of line. when I set font size of description label to 21 it's working. Why description label goes to dissappear when I am changing font size to 25? How to resolve it? I have also set auto resize cell height for increase size. description label attribute inspector alse code screenshot is image for disappear label when size is 25 label only show text when frame is under 8000 and for more text is not

iOS: Best practices for a “one-way” navigation controller?

旧巷老猫 提交于 2019-11-28 09:36:34
问题 I'm developing an app which is essentially a sequence of many different tests (for simplicity, think about an SAT test or a Mensa test). Each test is implemented in a different View+View Controller. Initially I wanted to use Storyboards and UINavigationControllers for managing the sequence of the tests and the transitions between them, but now I'm questioning the validity of this approach. A UINavigationController is a stack while my navigation is one-way only (once you've completed a test