storyboard

UI doesn't fill in iPhone 6 plus

十年热恋 提交于 2020-01-13 14:55:15
问题 I'm working on an iOS app and realize the ui is not auto stretch to fit the screen when it's running in iPhone 6 plus. So the UI is on the right left, and there are a lot of white space in the bottom and right. If I set the width of a view to beyond 320 (ex. 400), then the view be wider than 320. How could I make my views auto stretch to fill the screen? I have a few other apps, and they works perfectly fine in iPhone 6 plus. I couldn't figure out what make this app's ui not auto stretching.

ios change storyboard default view controller at run time

谁都会走 提交于 2020-01-12 08:27:10
问题 It it possible to override the default view controller from a storyboard to show a different controller instead? This would all happen in the AppDelegate of course. 回答1: @Martol1ni I wanted to use your answer, but I also wanted to stay away from unnecessary storyboard clutter so I tweaked your code a bit. However I did give you a +1 for your inspiring answer. I put all of the following on the default controller. - (void)gotoScreen:(NSString *)theScreen { AppDelegate *app = (AppDelegate *)[

iOS Storyboard: Views outside of the ViewController and on Top of the Scene (between First Responder and Exit boxes)

久未见 提交于 2020-01-12 04:34:32
问题 I am having a hard time understanding why you can put UIViews outside the UIViewController on the storyboard, and what the use case of it might be. For instance, on the storyboard I can add UIToolbar , UIAcitivtyIndicator and UIProgressView that is outside of the UIViewController . Is this mean there is a way for you to reference those Views that are outside UIViewController and potentially display them somehow either programmatically or embed those like you would do with a ContainerView ?

iOS 8 size classes for iPad landscape [duplicate]

被刻印的时光 ゝ 提交于 2020-01-11 17:12:50
问题 This question already has answers here : Sizing class for iPad portrait and Landscape Modes (6 answers) Closed 4 years ago . It seems all the current iOS devices maps to the new iOS 8 size classes nicely except iPad landscape? I seem not able to figure out how to use the size class feature to draw a different scene for iPad landscape (different from iPad portrait)? Is that intended by design in Apple's mind or am I miss something about the iOS size classes? 回答1: It appears to be Apple's

How to create storyboard layout multiple views within header view iOS?

点点圈 提交于 2020-01-11 12:34:28
问题 I have created header UIView on storyboard view controller, now I need to create 4 views like below colored image Into that UIview base view. It should show for all devices. Need to adjust auto layout using iOS . 回答1: First set constraints to header view. Select header view and apply following constraints: Leading, top, trailing space and Height = 80 (for example) Once you apply constraints to header view then select all buttons at once : Hope this can help 回答2: Try this.. Now IOS 9 realse

SWRevealViewController make sidebar button static & make the rearView appear on top of the frontView

落花浮王杯 提交于 2020-01-10 06:05:10
问题 Is there any way to make the rearView appear on top of the frontView as below image in storyboard using Objective-C. I want to make the Front View navigation Fixed & make sidebar button static. 回答1: This kind of android drawer external and open source library called as a CCKFNavDrawer . CCKFNavDrawer For using this following code. self.rootNav = (CCKFNavDrawer *)self.navigationController; [self.rootNav setCCKFNavDrawerDelegate:self]; Then implement delegate method - (void

UICollectionView inside of UIScrollView

不羁的心 提交于 2020-01-10 05:11:06
问题 I have a UIScrollView Labels Labels UICollectionView I have disabled the UICollectionViews scrolling functionality, so I only want to scroll with the Scrollview. My problem is that I don't know how I can calculate the UICollectionViews height so I can update my UIScorllView. If it's many elements inside the UICollectionView, it's get clipped. I have created this little HTML example to show what I'm looking for http://jsfiddle.net/hDwPH/ Dummy code 回答1: So my suggestion would be to use a

iOS - Using storyboard and autolayout to center the UIScrollView

时光总嘲笑我的痴心妄想 提交于 2020-01-09 09:55:52
问题 I'm creating iOS app using story board and auto layout so that it will work good on both iPhone4 and iPhone5. Below is the screen shot of the view that I'm creating using story board. In the above image, I want to keep the scroll view in the middle from leading edge of superview and the right table view. I dont want the scroll view to increase its width in iPhone5. I tried different combinations of constraints, but I couldn't achieve it. Can some suggest me what are all constraints that I've

How to put the UIPageControl element on top of the sliding pages within a UIPageViewController?

﹥>﹥吖頭↗ 提交于 2020-01-09 04:14:06
问题 Regarding to this tutorial by AppCoda about how to implement a app with UIPageViewController I'd like to use a custom page control element on top of the pages instead of at the bottom. When I just put a page control element on top of the single views which will be displayed, the logical result is that the control elements scrolls with the page view away from the screen. How is it possible to put the control element on top of the views so the page views are full screen (like with an image) so

WPF Button添加图片

て烟熏妆下的殇ゞ 提交于 2020-01-08 03:20:59
0、更改模板 效果: 代码: <Button x:Name="m_HelpButton" IsEnabled="True" Width="23" Height="23" Click="m_HelpButton_Click"> <Button.Template> <ControlTemplate> <Grid> <Ellipse> <Ellipse.Stroke> <SolidColorBrush x:Name="m_Stroke" Color="Silver" /> </Ellipse.Stroke> <Ellipse.Fill> <SolidColorBrush x:Name="m_Back" Color="White" /> </Ellipse.Fill> </Ellipse> <Image Margin="2" Source="Image/help1.png" /> </Grid> <ControlTemplate.Triggers> <Trigger Property="Button.IsMouseOver" Value="True"> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> <ColorAnimation To="LightBlue" BeginTime="0:0:0.1" Duration="0:0:0