uistoryboard

Storyboard segues causing memory leaks

自作多情 提交于 2019-11-27 08:29:41
I have two UIViewControllers with buttons triggering segue (modal) to each other. I wanted to discover if that's causing any memory leaks while jumping back and forth and I see that Living Object && allocated memory is going up, what eventually would leave to app crash. I don't have any single line of code - working with pure UIViewControllers. What I might be doing wrong? Could have I set something wrong in project settings? Am I reading profiler's statictics badly? Do I need to make any special release commands while working with segues? You aren't using the modal segues correctly. The way

Dynamic height for static table cells with wrapping labels?

巧了我就是萌 提交于 2019-11-27 07:55:11
My text is two lines long in portrait mode. When I switch to landscape mode, it fits into a single line. I'm using static tableview cells via a storyboard; how can I resize the row to fit snugly? The screen is a signin screen. The first cell contains some explanation text The second is a text field for entering the account name The third is a secure text field for entering the password The fourth (and last) cell contains the signin button. The return key on the keyboard submits the form or switches the focus as appropriate Use UITableView's heightForRowAtIndexPath : - (CGFloat)tableView:

Selecting different storyboards based on device type

六月ゝ 毕业季﹏ 提交于 2019-11-27 07:38:48
问题 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

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

泄露秘密 提交于 2019-11-27 07:33:15
问题 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;

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

蓝咒 提交于 2019-11-27 06:38:47
问题 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

How to Dismiss a Storyboard Popover

走远了吗. 提交于 2019-11-27 06:15:49
I've created a popover from a UIBarButtonItem using Xcode Storyboards (so there's no code) like this: Presenting the popover works just fine. However, I can't get the popover to disappear when I tap the UIBarButtonItem that made it appear. When the button is pressed (first time) the popover appears. When the button is pressed again (second time) the same popover appears on top of it, so now I have two popovers (or more if I continuer pressing the button). According to the iOS Human Interface Guidelines I need to make the popover appear on the first tap and disappear on the second: Ensure that

Linking child view controllers to a parent view controller within storyboard

风格不统一 提交于 2019-11-27 06:11:14
Can you associate child view controllers to a custom container view controller in Storyboard? I can link child view controllers to a tab view controller, and I can link one view controller to a navigation controller. What must I do to the container VC to accept child VCs? As something of a combo of Caleb and Matt's answers, I did: -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"cpdc_check_embed"]) { self.checkVC = segue.destinationViewController; } } ...where checkVC is a property on the container controller: @property (weak

Can an 'Unwind Segue' work between two storyboards connected by a storyboard reference?

我怕爱的太早我们不能终老 提交于 2019-11-27 05:45:00
问题 In iOS 9, storyboards can be connected by a 'storyboard reference' that links to a second storyboard by adding a storyboard reference and setting the 'referenced ID' to the name of another storyboard file. Is it possible to set up an unwind segue in the second file that unwinds to a scene in the first file? If so, what steps are involved, either in Interface Builder or in code? 回答1: Starting from your storyboard reference, create a new storyboard reference that will be a reference back to

How to set Image in Tabbar not Tint color in ios?

时光总嘲笑我的痴心妄想 提交于 2019-11-27 05:23:07
I have an application with UITabbar , I want to set image in Tabbar but am unable to set image in Tabbar. Instead of as it is image i get image shape in tint color, Is it possible to set image as it is in Tabbar? . i have Tried this code but Unable to set image. UITabBar *tabBar = self.tabBar; UITabBarItem *targetTabBarItem = [[tabbar items] objectAtIndex:0]; // whichever tab-item UIImage *selectedIcon = [UIImage imageNamed:@"name-of-selected-image.png"]; [targetTabBarItem setSelectedImage:selectedIcon]; You need to set your image attributes property Render As to Original Image . To change

Segue from modal view to tab bar view controller and not lose tab bar

馋奶兔 提交于 2019-11-27 04:41:38
Hello Im trying to segue from a modal to a tab bar view controller without losing the tab bar? I know the question is short, but this is all I'm asking. Scenario: I have a Tab Bar View Controllers, A and B. B modals to C view controller. Then I want to return to View Controller A. Swift please :D Here is my example of how to do this. In my setup, I choose the yellow ViewController from the tab, then press Go! which modally presents the white ViewController . Pressing Exit returns to the green ViewController . To set this up, use an unwind segue to return to the viewController that called you.