storyboard

iOS Storyboard - any way to change font size based on screen size?

大城市里の小女人 提交于 2019-12-30 11:09:17
问题 I want to be able to scale the font size on a storyboard per screen size without writing code to do this, is this possible. I already tried to set up constraints to adjust the label and set the font scaling factor but what happens then it depending on how long the text is I end up getting a screen that has different font sizes rather than all of the font for that screen being the same size? 回答1: Xcode provides auto shrinks facility, Which adjust based on screen size Goto Attribute inspector->

How to stop WPF storyboard composed only in XAML

对着背影说爱祢 提交于 2019-12-30 09:24:11
问题 I have a animation defined in XAML (as a UserControl) that essentially switches between two images every second: <UserControl x:Class="KaleidoscopeApplication.Controls.RemoteAnimation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="RemoteAnimation_Loaded" Unloaded="RemoteAnimation_Unloaded"> <Grid Canvas.Left="500" Canvas.Top="84"> <Grid.Triggers> <EventTrigger RoutedEvent="Grid.Loaded"> <BeginStoryboard>

How to access properties of a view controller loaded from storyboard?

半世苍凉 提交于 2019-12-30 07:10:08
问题 I have a view controller instance created with instantiateViewControllerWithIdentifier like this: TBSCTestController* testController = [self.storyboard instantiateViewControllerWithIdentifier: @"OTP"]; TBSCTestController has an IBOutlet property named label which is hooked up with a label in the storyboard: I want to modify the text of label using this code but nothing changes: testController.label.text = @"newText"; [self.view addSubview: testController.view]; The testController is a valid

How to open Storyboard as xml source?

拟墨画扇 提交于 2019-12-30 05:46:08
问题 I need to reorder View controllers in my Storyboard . I know that I need to open Storyboard as source code using right clicking on the file and using menu Open as... . Then I can open Storyboard as xml file. My problem is sometimes the source is opened as text - there are no colour differences on the comments for example. Also when I make move of the code inside it is not indented properly. How to open Storyboard source as xml ? 回答1: To open Storyboard as XMl source: Right click on your

How to load a storyboard from a XIB file?

本秂侑毒 提交于 2019-12-30 05:35:50
问题 I am trying to load a storyboard file from a XIB file when a button is clicked. So in the IBAction method I have called the following line: - (IBAction)NextView:(id)sender { UIStoryboard *mainStoryBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; [mainStoryBoard instantiateViewControllerWithIdentifier:@"StoryViewController"]; } But I get this error when I run the application Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard (

How can i use xib files instead of storyboard in Xcode 5?

折月煮酒 提交于 2019-12-30 04:48:07
问题 I'm very new to ios developing and many of the tutorials i watch follow the xib approach since they were recorded before XCode 5. How can i go with the xib approach in Single View Application? When i delete storyboard and select one of the xib's as the main interface it's not working. Thanks for any tip. 回答1: add new file in that select the cococatouch and select the Objective -C class and then go to the next click. you show the below screen at the bottom must select the with xib for user

Highlighting cells in WPF DataGrid when the bound value changes

…衆ロ難τιáo~ 提交于 2019-12-30 04:01:10
问题 I have a DataGrid that has its data refreshed by a background process every 15 seconds. If any of the data changes, I want to run an animation that highlights the cell with the changed value in yellow and then fade back to white. I sort-of have it working by doing the following: I created a style with event trigger on Binding.TargetUpdated <Style x:Key="ChangedCellStyle" TargetType="DataGridCell"> <Style.Triggers> <EventTrigger RoutedEvent="Binding.TargetUpdated"> <BeginStoryboard>

Storyboard + base localization + .strings file does not localize at runtime

江枫思渺然 提交于 2019-12-30 02:01:05
问题 (There are similar questions. Some resulted in answers that I've tried and found not to work. Others got no answers, I assume because the querents didn't supply as much detail as I'm about to.) I started with a storyboard that worked well for my app; the strings it contains are in English. I wanted to add a French localization. I did this: Added a base localization, which transferred MainStoryboard.storyboard from en.lproj to Base.lproj . Added a French localization, which cloned InfoPlist

IBOutlet is nil inside custom UIView (Using STORYBOARD)

天大地大妈咪最大 提交于 2019-12-29 20:27:41
问题 I have a custom UIView class. Inside it I have declared an IBOutlet property for UIImageView . #import <UIKit/UIKit.h> @interface SettingItem : UIView{ } @property (strong, nonatomic) IBOutlet UIImageView *myImage; @end Now i am using storyboard. There is a viewcontroller. I dragged UIView to viewcontroller. I dragged one UIImageView as a subview of above UIView . I set the "SettingItem" class to UIView from storyboard. I connected the outlet to myImage by normal dragging from outlets of

WPF Storyboard Animation Not Working

耗尽温柔 提交于 2019-12-29 08:07:11
问题 I have my custom 3D model class (Model) which contains Visual3D element and a Storyboard (sb) to hold animations related to that model. I'm trying to rotate the Visual3D element using the Storyboard but unfortunately it's not working. Here is the code snippet public void AnimationRotate(Model model, double duration, double startTime, RepeatBehavior behaviour) { //Rotate transform 3D RotateTransform3D rotateTransform = new RotateTransform3D(); //assign transform to the model model.Visual3D