uistoryboard

UIButton different alignment for title and image

南楼画角 提交于 2020-01-05 10:29:01
问题 Hello I am creating UIButton which is displaying image and title at the same time. I want title and image to be both centred, button to be above image. Problem is that because of localisation of string from button, string length is changing, and alignment from UIStoryboard combined with edge insets is not working as I want it to work. Can someone help me and point me in the right direction? 回答1: set these two. 1. set Align controls of UIButton set Image and Text Inset of UIButton 回答2: The

Is there a way to add custom fonts to Xcode to be available from a storyboard? [duplicate]

别等时光非礼了梦想. 提交于 2020-01-05 10:13:09
问题 This question already has answers here : Designing labels/text views with custom fonts in Interface Builder (8 answers) Closed 5 years ago . I know how to add custom font files to be shipped with an iOS app. I can then customize the label font from code using code like this : UIFont* font = [UIFont fontWithName:@"League Gothic" size:42]; self.topLabel.font = font; My concern is that such customization will "infect" all of the project and may require some significant rework later on. Is there

Xcode - Button looks good in storyboard but not on emulator

被刻印的时光 ゝ 提交于 2020-01-05 04:31:11
问题 When I work with buttons in the storyboard they look good, like this: But when i run the app they turn out like this: Do you guys know why? Here are som settings: Thanks! 回答1: You might have put image in Image attribute of inspector. Put that image in Background attribute of inspector. 回答2: top one in your attribute inspector Type , change that to Custom from Rounded . By the way, our iOS has simulator not emulator . In android sdk we call it emulator ;) 回答3: check the view content mode in

How to manage the items in the storyboard to add the possibility to expand/collapse the cell of the tableView

安稳与你 提交于 2020-01-04 05:42:12
问题 I'm trying to create in my tableView the ability to expand and collapse the various cells with a click, not considering the code, how I have to set the elements and constraints in the storyboard? In the sense, in the content view of my cell how many UIView should I add, assuming that I want to double the size of the cell when I expand it, this UIView I have to add one on top of the same size? The constraints instead? I already tried to give a look at some tutorials but they were not too clear

UITabBarController with diffent storyboard file for each ViewController of the TabBar

别来无恙 提交于 2020-01-03 17:35:13
问题 My team is developing an application that has a UITabBarController. We are using Storyboard to develop the interfaces and the flows. Since we are a team, we cannot put all flow in just one storyboard, because it will cause in problems with syncing with SVN. So, the solution is to put each tab`s flow in one different storyboard file. The connection between storyboards is not the problem when I can create an object to do the connection (a button, for example) as we can see in this tutorial. But

Xcode 6: iOS doesn't use storyboard localizations

白昼怎懂夜的黑 提交于 2020-01-03 17:16:11
问题 since I upgraded my Xcode project to Xcode 6, my storyboard localizations don't work. I have: A base localization as storyboard file (which is basically English) Four string files: English, German, French and Japanese Until Xcode 5 those worked without any problems. But since Xcode 6 I have the following situation: The application only uses the labels used in the base file when running on a device/simulator BUT my Localizable.strings file, which I have in different languages for all non

Drag Segue To Self in Storyboard

我只是一个虾纸丫 提交于 2020-01-03 10:56:13
问题 I want to drag a segue from my viewcontroller, to itself. So I can push "infinite" instances of that particular view controller. I know how to do this in code (I.e instansiate the view controller programmatically). However, I want to use segues as far as possible. I've found a few "hacks" for making segue to self in storyboard, but I don't like hacks, so my question is; Is there a clean way to make a segue back to self in the Storyboard? I dont want to drag it from a button or such, I just

iOS - load and switch between pages using UIPageContol

一世执手 提交于 2020-01-03 03:26:22
问题 I would like to use UIPageControl to navigate between different view controllers. I have 2 view controllers and another main view controller contains the UIPageControl . The 2 view controllers to be navigated between have been added as children to the main view controller. When I currently start the application, I see a blank screen. I used pageControl.currentPage = 0 but I am unable to understand why I am unable to see the views. Note that I do not want to use UIScrollView in my application.

UITableView - SelectedBackgroundView not working in iOS7 with Auto-Layout

谁说胖子不能爱 提交于 2020-01-03 03:22:49
问题 I am using UITableVeiw with static cells in iOS7. The table view looked like this before I converted my storyboard to use autolayouts. I am using the "background view" property and the "selectedBackgroundView" property of the tableviewcell to set backgrounds like so: After enabling auto-layout though in the storyboard, the layout goes bonkers and this is what I am left with: I don't have any auto-layout issues that are presented to me. Just that I am not seeing the foreground and background

uppercase label in xcode storyboard not wanted

女生的网名这么多〃 提交于 2020-01-03 03:01:19
问题 I'm using xcode 6 with storyboard for ios app development. I have a problem with UILabel in view controllers in storyboard: the text is simple and inlower case, but when I run the app in the simulator or in the device I see the Label text in UPPERCASE. Labels have no outlets, and cannot be modified programmatically. some one has a solution? I'd prefer not using IBOutlet and setting text by code.. 回答1: I had somewhat similar problem. In my case everything(title, lables, button texts, etc.) was