storyboard

Display just two columns, with multiple rows in a CollectionView using storyboard

醉酒当歌 提交于 2019-12-09 04:08:33
问题 I want to display only two cells in a row, no matter what the iPhone screen size is. Like, My storyboard contains a UICollectionView ,connected by constraints. The storyboard settings for the UICollectionView is, Now, when I run this in 6, 5s or below, only one cell appears in a row. The code I'd used is, - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ return [categoryImages count]; } - (UICollectionViewCell *)collectionView:

WPF 加载等待动画

梦想的初衷 提交于 2019-12-09 02:53:56
直接上代码: xmal: <Controls:MetroWindow x:Class="MyControlLibrarys.LoadDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:MyControlLibrarys" Title="正在加载" WindowStyle="None" Height="180" Width="430" ShowMaxRestoreButton="False" ShowMinButton="False" ShowCloseButton="False" WindowStartupLocation="CenterScreen" Opacity="1"> <Grid> <Grid.ColumnDefinitions>

Having a zombie issue on UISearchDisplayController

做~自己de王妃 提交于 2019-12-08 19:45:48
问题 I am having a zombie while using a UISearchDisplayController with a UITableView. The UISearchDisplayController (and the rest of the view) is set via interface builder (storyboard on xcode 5 and using ARC and iOS 7 only). The searchDisplayController is used by these 2 methods -(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { [self filterContentForSearchText:searchString scope: [[self.searchDisplayController

Crash when instantiating ViewController from Storyboard

房东的猫 提交于 2019-12-08 19:44:22
问题 I have got a single view in my storyboard, which I add to my current view by doing the following : MainViewController *mvc = [self.storyboard instantiateViewControllerWithIdentifier:@"MainController"]; [self.view addSubview:mvc.view]; The view appears, but everything I do after it appears, leads to a crash. What am I doing wrong ? Here is an example when it crashes: -(IBAction)showUsername:(id)sender{ [testLabel setText:@"username"]; } Everything is hooked up in storyboard as well, so falsely

Tab bar buttons all gray

折月煮酒 提交于 2019-12-08 19:23:29
问题 I'm trying to create a tab bar controller but last time I did it was with iOS 6.1. But now when I put a Tab bar Controller on the storyboard it doesn't show the buttons, and any modifications I try to make on background and text does not appear. Anyone knows how can I fix it? Below is an image of the described problem. Thanks! 回答1: Since it is just mentioned in the comments and I struggled with this problem for quite a while, this is a solution: Add an image to the Tab Bar Item and you will

Adjust height of UILabel dynamically using iOS storyboard

白昼怎懂夜的黑 提交于 2019-12-08 19:03:56
问题 I have a label, which has been created using iOS Storyboard layout. Contents of label, however, are dynamic and can change during run time. How do I make sure that label's height gets adjusted based on the content in the label. I tried: Setting number of lines to 0 Setting Editor -> Size to Fit Content . But they don't work. Text in label gets printed only in single line, and as a result of that some of text doesn't appear on the screen. Any help would be highly appreciated. 回答1: Try this way

App Crashing Entire Device On Segue for iOS 9 + Xcode 7

血红的双手。 提交于 2019-12-08 18:16:45
问题 UPDATE: I've used one of my DTS for the year on this. Currently working with an Apple Support Engineer. On his suggestion, I've also created a bug report for this. I'll update this thread as time passes hopefully resulting in a FINAL solution. Somehow, I've figured out a way to create an app that literally reboots a simulator and/or physical device. Hurray for me. This problem started when I upgraded to xcode 7 and started testing against iOS 9. On ANY device/simulator < iOS 9, this problem

perform segue in viewDidLoad() without navigation controller in Swift

扶醉桌前 提交于 2019-12-08 18:03:41
问题 I have three views (view 1 checks a server connection, view 2 shows the main content, view3 shows the support page) and I created them in the storyboard without coding. On starting my iOS app the view 1 shows a spinner while checking the server connection. If the connection check is passed then I want to go to view 2 and if it's failed then I want to go to view 3. The view 1 is only for the connection check and I don't want to go back to this view. So, I think I don't need a navigation

Storyboard: Control-drag from a bar button to the Exit item

和自甴很熟 提交于 2019-12-08 17:28:08
问题 So I'm working on a new tutorial from Apple (https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOS/SecondTutorial.html) and got to a point where I'm having a problem with the storyboard: I cannot Control-drag from a UIBarButton to the Exit item in the scene dock. When I click on the Exit item the Attributes inspector says "Not Applicable". Here is an extract of the tutorial. I am not able to post immages. For a better understanding of my problem you can see an

Issues with AutoLayout with Custom Views defined in NIB file and used in StoryBoard

好久不见. 提交于 2019-12-08 15:51:55
问题 I've defined a custom view in a NIB file and would like to instantiate a copy in a StoryBoard but I'm having issues with autolayout. In a simple example, the custom view has single label with a fixed size and centered both vertically and horizontally, all using autolayout. The file owner is set to my class, it has an outlet to the top view. In the custom view implementation I do: - (id)initWithCoder:(NSCoder *)aDecoder { self = [super initWithCoder:aDecoder]; if(self) { [[NSBundle mainBundle]