storyboard

Get container VC instead of view

孤者浪人 提交于 2019-12-13 04:20:44
问题 I'm a little confused how containers works. I have containers: And i try to manage this in my MainViewController . But when i control-drag it into my .h file i'm getting @property (weak, nonatomic) IBOutlet UIView *liveContainer; Why this is an UIView class? This mean that is self.view my BaseButtonContainerView ? But I have BaseButtonContainerViewController , and in debug i see that viewDidLoad is called. Can i get access to BaseButtonContainerViewController methods from MainViewController ?

How to perform UIButton action before loading next view

淺唱寂寞╮ 提交于 2019-12-13 04:05:43
问题 I have a view where a user enters 3 sting fields. On the button press the fields are stored in an array. The button also changes the view. The problem im having is when I get the strings from the array in the other view. The values that are being returned are the pervious values that have been entered. I have added some lines to log what is going in and what is come out of the arrays. From the log I can see that the array is being called before it is set. How to I get the button to run its

Autolayout 16:9 animated GIF in Storyboard Xcode 10, iOS

大兔子大兔子 提交于 2019-12-13 03:49:04
问题 I'm having a Universal app and wanted to add a little tutorial. For that I have created a 16:9 animated GIF. I wanted to position that top/left or top/right. Text and buttons wherever space is left. The image is initially 400x225, but I can accept any size, as long as 16:9 is kept. I cannot figure out, how I could align that so that on phones it uses a smaller rect as on an iPad. 回答1: If I understand correctly, you want the UIImageView to keep the same ratio. You can do it using constraints,

WPF StoryBoard doesn't begin if Stop() is called after processing

二次信任 提交于 2019-12-13 03:37:46
问题 I have a button containing an image, and I want that image rotates while some code is executed, then stop at the end of this processing. My code almost works if I begin the storyboard, but when I add the line sb.Stop(), the animation never begins. Here is my code: private void refreshPostIt(int postItIndex) { Button btn = // Button to rotate Storyboard sb = new Storyboard(); DoubleAnimation rotate = new DoubleAnimation(); rotate.From = 0; rotate.To = 360; rotate.RepeatBehavior =

How can i center the content on a view controller so that it is always centered no matter what device size is used in xamarin storyboard?

半世苍凉 提交于 2019-12-13 03:37:33
问题 Im developing an app in xamarin and I am having trouble getting the Launch Screen to work properly for when i boot up the app. I am using storyboard for the launch screen. The view is set at generic and the width and height are set to any. However when I start the app the launch screen cuts off the majority of my picture and labels that i have centered in the generic view on the view controller. Does anyone know what i can do so that no matter what device I use (iPhone 5s, 6, 6plus, etc.),

embed video in a view controller ios

孤人 提交于 2019-12-13 02:54:44
问题 I have a json file which includes data and between this data I have a video field. how can I embed a video object in a view controller, what shall I put in the interface builder?? I cannot find video object in the objects existed on the right side. see below: Shall I add some libraries? I need to help me how can I play a video object on my application. I need your help please. 回答1: Just load the files into UIWebView, it can handle both videos and PDFs. OR https://developer.apple.com/library

How do I present a View Controller and dismiss all others?

别等时光非礼了梦想. 提交于 2019-12-13 02:45:47
问题 I have about 20 View Controllers, chained together with Modal and Push segues. Now, at the last View Controller I want to switch back again to the first View Controller, as if the user has restarted the app. Unfortunately when I do this with [UIViewController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"InitViewController"]]; [self presentViewController:viewController animated:YES completion:nil]; all of the previous view controllers are not unloaded. Not a

UIScrollView and auto layout not working

大兔子大兔子 提交于 2019-12-13 02:14:43
问题 I'm trying to make a view scrollable in my app. O follow exactly the steps in tutorial https://www.youtube.com/watch?v=UnQsFlMGDsI . The main steps I did were: Add a UIscrollView Add a view into UIscrollView (Content View) Create the margin constraints with value 0 (top, left, right and botton) for UIScrollView Create the margin constraints with value 0 (top, left, right and botton) for Content view Create 2 constraints of "equal width" and "equal height" between ContentView and main view ...

Is it possible to start same animation for different controls at same start time

蹲街弑〆低调 提交于 2019-12-13 02:13:28
问题 I have a story board with double animation, <Storyboard x:Name="Storyboard1"> <DoubleAnimation From="0" To="200" Duration="0:0:2" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)"> </DoubleAnimation> </Storyboard> and I just adding TargetNameProperty dynamically, private void set_animation_for_images(string target_name) { Storyboard1.Stop(); Storyboard1.SetValue(Storyboard.TargetNameProperty, target_name); Storyboard1.Begin(); } Here is it possible to

Autoresizing Not Working Programmatically

可紊 提交于 2019-12-13 02:03:08
问题 I want to create a UIView which will resize it's width according to iPhone Screen size and it should be remain at bottom of view. I created fresh project with storyboard and add below code. Here is my code -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:true]; UIView *box = [[UIView alloc]initWithFrame:CGRectMake(0, 448, 320, 120)]; [box setBackgroundColor:[UIColor redColor]]; [box setAutoresizingMask:UIViewAutoresizingFlexibleHeight]; [box setAutoresizingMask