uistoryboard

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

≯℡__Kan透↙ 提交于 2019-11-26 11:34:10
问题 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

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

删除回忆录丶 提交于 2019-11-26 11:16:33
问题 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 回答1: 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

Prototype Cells in a nib instead of a storyboard

China☆狼群 提交于 2019-11-26 10:16:50
问题 For better re-usability I want to create a table view outside of my Storyboard. Now when I create a UITableView based ViewController with Nib in Xcode I get the default TableView in the nib file. However, I am not able in Interface Builder to add prototype cells like I am in my Storyboard. Is it currently not possible to add prototype cells in a nib or am I missing something. Thanks very much for any help. 回答1: iOS 5 includes a new method on UITableView: registerNib:forCellReuseIdentifier: To

UITextView - setting font not working with iOS 6 on XCode 5

吃可爱长大的小学妹 提交于 2019-11-26 07:30:44
问题 I\'m using storyboards for my UI. I was previously using XCode 4.6 and released on iOS 6. I have since updated to iOS 7 using XCode 5 and updated the Storyboard to work nicely with XCode 5. I have one issue though: UITextView doesn\'t want to display font changes within code. Text colour changes work fine. Any other property changes are fine. Font, not at all. I was using a custom font, so I checked different fonts with different sizes (i.e. systemFontOfSize: ) but that didn\'t work. The text

Segue to another storyboard?

*爱你&永不变心* 提交于 2019-11-26 06:52:01
问题 Is it possible to segue from one storyboard to another, or to embed a storyboard in a view controller in another storyboard? I need to place a UITabBarController in a UINavigationController , and I\'d like to keep them nice and separate. 回答1: Yes, but you have to do it programmatically: // Get the storyboard named secondStoryBoard from the main bundle: UIStoryboard *secondStoryBoard = [UIStoryboard storyboardWithName:@"secondStoryBoard" bundle:nil]; // Load the initial view controller from

How do I create a segue that can be called from a button that is created programmatically?

风格不统一 提交于 2019-11-26 06:38:08
问题 In Swift I have a button created programmaticaly using: var button = UIBarButtonItem(title: \"Tableau\", style: .Plain, target: self, action: \"tabBarTableauClicked\") I want that when the user clicks the button it changes viewControllers. Here is the code for tabBarTableauClicked : func tabBarTableauClicked(){ performSegueWithIdentifier(\"tableau\", sender: self) } But it is obviously not working because there is no segue with an identifier called \"tableau\". And I can\'t create a segue

Xcode without Storyboard and ARC

雨燕双飞 提交于 2019-11-26 06:11:58
问题 i have downloaded new xcode-5 and just started using it. We can create application directly including storyboard and ARC , it is not asking for option like earlier versions. So, my question is how can we use xcode5 without ARC and storyboard. we have to manually remove storyboard file ? or is there any other option. 回答1: Create a project with an Empty application and Add any viewcontroller (i added TestViewController here) - (BOOL)application:(UIApplication *)application

Prepare for Segue in Swift

拟墨画扇 提交于 2019-11-26 05:31:53
问题 I\'m facing the error message: \"UIStoryboardSegue does not have a member named \'identifier\'\" Here\'s the code causing the error if (segue.identifier == \"Load View\") { // pass data to next view } On Obj-C it\'s fine using like this: if ([segue.identifier isEqualToString:@\"Load View\"]) { // pass data to next view } What am I doing wrong? 回答1: This seems to be due to a problem in the UITableViewController subclass template. It comes with a version of the prepareForSegue method that would

In iOS13 the status bar background colour is different from the navigation bar in large text mode

拟墨画扇 提交于 2019-11-26 05:31:04
问题 Pre-conditions to reproduce the problem: Xcode 11 beta + iOS 13 (latest version until Jun. 12 2019) The navigation bar is in Large text mode Specify the colour of navigation bar. The status bar will remain in white in a real device, above the green navigation bar. Solutions I tried: Revert it back to iOS12 will solve it, but we will encounter iOS13 eventually... disabling the large text mode will solve it... hide the status bar will fix it, but it will cause status text overlapping with

UIPageViewController and storyboard

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 05:16:13
问题 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; }