xcode-storyboard

UITableView with static cells does not appear

自作多情 提交于 2019-11-26 21:50:32
I have created a new Xcode project using Storyboards (tab view template). I added a couple of view controllers to my storyboard, and wanted to use a UITableView with static cells for one. I created it, but when I run in the simulator the cells don't appear. I haven't changed anything in the project except for this storyboard file. I am showing screenshots of the storyboard editor and the simulator running. The label shows up, so the view is loading correctly. I set the background color to gray so I can see the talbeview is loading. All cells are set to visible. I changed their style to Basic

Font size on universal storyboard

a 夏天 提交于 2019-11-26 20:58:20
问题 I'm building an iOS app from scratch on Xcode 6 beta 4. I'm trying to make it universal and to use autolayout to have the same views for iPhone and iPad. What is the best way to manage font sizes? For instance, a button with font size 10 might be OK on an iPhone, but I might want it to be bigger when my button scales up for the iPad. Should it be managed programmatically or is there a smart way to do this? 回答1: When you're using universal storyboards, each text-displaying control in a

Text views and image view disappearing from view controller in Xcode 6.1 storyboard

霸气de小男生 提交于 2019-11-26 19:49:03
问题 I updated to Xcode 6.1 to fix an error I was having with the Interface Builder Cocoa Touch Tool spiking to 99% CPU usage when I used the storyboard, which would freeze Xcode. Now that that error is fixed, I have a possibly even more frustrating error. When I use the storyboard, while I'm working on a UIViewController , my UITextView , my custom UITextView s (which are subclasses of UITextView , but for all intents and purposes in the storyboard, they're UITextView s), and my UIImageView

Xcode 8 - IB Designables - Failed to render and update auto layout status, The agent crashed

百般思念 提交于 2019-11-26 19:30:13
I recently upgraded to Xcode 8 and I am having issues with the Storyboard. If I open the project and I don't have the Storyboard open, it will compile and run just fine. Once I open up the Storyboard, I get multiple errors about IB Designables as shown below. These views are the only views that are using custom views from TextFieldEffects and BEMCheckbox that I imported using Cocoapods. You can try one of the following to figure out the cause: look for the IBDesignablesAgentCocoaTouch logs in this directory: ~/Library/Logs/DiagnosticReports and see the cause. Go to the Editor -> Debug Selected

What is the difference between a .xib file and a .storyboard?

泄露秘密 提交于 2019-11-26 18:43:48
问题 Can someone explain in simple words the difference between .xib and .storyboard? 回答1: Apple introduced the concept of "storyboarding" in iOS5 SDK to simplify and better manage screens in your app. You can still use the .xib way of development. Pre-storyboard, each UIViewController had an associated .xib with it. Storyboard achieves two things: .storyboard is essentially one single file for all your screens in the app and it shows the flow of the screens. You can add segues /transitions

UIPageViewController and storyboard

风格不统一 提交于 2019-11-26 17:09:42
I'm trying to configure a UIPageViewController SPECIFICALLY from storyboard: TutorialPageViewController.h #import <UIKit/UIKit.h> @interface TutorialPageViewController : UIPageViewController <UIPageViewControllerDelegate, UIPageViewControllerDataSource> @end TutorialPageViewController.m #import "TutorialPageViewController.h" @interface TutorialPageViewController () @property (assign, nonatomic) NSInteger index; @end @implementation TutorialPageViewController { NSArray *myViewControllers; } - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super

IOS7, Segue and storyboards - How to create without a button?

我只是一个虾纸丫 提交于 2019-11-26 16:07:24
I currently have a login View and an Application view, I have successfully implemented validation on the login view and I need to programmatically shift to the application view on successful validation. I understand I can add a segue to the login button and then call it programmatically like so... [self performSegueWithIdentifier:@"LoginSegue" sender:sender]; But this will obviously be triggered whenever the button is clicked (As the segue was created attached to the button). I've just read that I should create a button (And hide it) and then make a programmatic call to the segue - this seems

Modify UIImage renderingMode from a storyboard/xib file

有些话、适合烂在心里 提交于 2019-11-26 15:18:51
问题 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. 回答1: 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

When to use Storyboard and when to use XIBs

ⅰ亾dé卋堺 提交于 2019-11-26 14:48:12
Are there any guidelines on when to use storyboards in an iOS project and when to use XIBs? what are the pros and cons of each and what situations do they each suit? Near as I can tell it's not that clean to use storyboard segues when you have view controllers being pushed by dynamic UI elements (Like map pins). henning77 I have used XIBs extensively and completed two projects using Storyboards. My learnings are: Storyboards are nice for apps with a small to medium number of screens and relatively straightforward navigation between views. If you have lots of views and lots of cross-navigation

UITableView with static cells does not appear

喜你入骨 提交于 2019-11-26 08:04:14
问题 I have created a new Xcode project using Storyboards (tab view template). I added a couple of view controllers to my storyboard, and wanted to use a UITableView with static cells for one. I created it, but when I run in the simulator the cells don\'t appear. I haven\'t changed anything in the project except for this storyboard file. I am showing screenshots of the storyboard editor and the simulator running. The label shows up, so the view is loading correctly. I set the background color to