storyboard

Animate a linear brush using a data trigger

与世无争的帅哥 提交于 2019-12-12 15:31:10
问题 I am trying to animate a linear brush on a border using a data trigger but have come accross a problem where I cannot use the TargetName My code is as follows, can anyone suggest a way to resolve this? <Border Grid.Row="2" BorderThickness="10" Height="100" Width="100" > <Border.BorderBrush> <LinearGradientBrush> <GradientStop Color="Yellow" Offset="0.0" /> <GradientStop x:Name="gradient" Color="Orange" Offset="0.5" /> <GradientStop Color="Yellow" Offset="1.0" /> </LinearGradientBrush> <

Bind to an attached behavior on a Storyboard

家住魔仙堡 提交于 2019-12-12 15:14:56
问题 I have created an attached dependency property for Storyboards, with the intention of enabling me to call a method on my ViewModel when a Storyboard Completed event fires: public static class StoryboardExtensions { public static ICommand GetCompletedCommand(DependencyObject target) { return (ICommand)target.GetValue(CompletedCommandProperty); } public static void SetCompletedCommand(DependencyObject target, ICommand value) { target.SetValue(CompletedCommandProperty, value); } public static

Load an UIView from UIViewController inside storyboard doesn't work

那年仲夏 提交于 2019-12-12 15:11:51
问题 I am trying to load an UIView from an UIViewController inside my Storyboard without segue . I created the UIViewcontroller , layouted everything, connected it with the specific class and set a Storyboard ID . I also connected the elements to the h.file of my class and now I am looking for a way to initialize a subview of this UIViewController without a segue . I have been searching and found a lot of posts which loads the UIViewController this way: UIStoryboard *storyboard = [UIStoryboard

UIButton is not working/Clickable in UIScrollView

邮差的信 提交于 2019-12-12 15:08:33
问题 I am using auto layout with UIScrollView . Main UIView Height = 1300 ContentView (within UIScrollBar ) UIView = 1100 The ConetntView contains a button at the bottom. It is completely visible but when I click it, it does not work. Constraints are : 1) ScrollView leading, trailing, top & bottom with main UIView 2) ContantView leading, trailing, top & bottom with UIScrollView 3) Equal height constraint between ContentView & main UIView Please help. 回答1: So, according to your comment this is

Storyboard and xib use in same project

强颜欢笑 提交于 2019-12-12 13:46:48
问题 I am stumbling over what I believe is probably a fundamental misunderstanding of how classes work in Objective-C. I am using Storyboards but in this app I wanted to create a simple custom date picker view for a textfield on one of my view controllers. However, I seem to be having a problem accessing any of the properties of the date picker class from my view controller: First I modeled my CustomDatePicker.xib in IB as follows: I have created a custom class by sublcassing UIView as follows:

Custom UITableViewCell using Storyboard

江枫思渺然 提交于 2019-12-12 13:01:10
问题 I'm trying to make a custom cell using storyboard. I have tested my program with Basic cells and it worked. Now I'have created a new class that I named NewsCell, which is containing the different Labels in the custom cell. I have also made the cell a subclass of NewsCell. The cell identifier is "NewsCell". This is the cellForRowAtIndexPath: method: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NewsCell *cell = (NewsCell *)[tableView

Grey bar appearing under Navigation bar after segues Swift

喜夏-厌秋 提交于 2019-12-12 12:30:00
问题 A grey bar exactly the size of my navigation bar + status bar appears under my navigation bar when I segue to the specific VC. In another VC the grey bar isn't there unless I open Youtube then use the iOS 9 "back to 'App'" button. Here is what it looks like: As you can see from the picture, the grey bar is not covering the YTPlayerView but is instead shoving it down. What is going on here? EDIT I added the view hierarchy for clarity. EDIT I added the constraints for the YTPlayerView in

ViewController gets deallocated which leads to crash

左心房为你撑大大i 提交于 2019-12-12 12:22:33
问题 I have a view in my storyboard which I assigned an identifier called "MainView". However if I add its view to the subview, everything that follows produces a crash (e.g. pressing a button) MainViewController *mvc = [self.storyboard instantiateViewControllerWithIdentifier:@"MainView"]; [self.view addSubview:mvc.view]; This is the action triggered by the button : (MainViewController.h) -(IBAction)showUsername:(id)sender{ [testLabel setText:@"username"]; } and the crash log : -

Storyboard animation in MVVM

牧云@^-^@ 提交于 2019-12-12 11:57:46
问题 I'm trying to fade a textblock in then out to show a success message in MVVM but I can't get it to fade out again. I looked at this: WPF MVVM Property Change Animation but don't really follow. here is the style: <Style TargetType="TextBlock" x:Key="fadeinout"> <Style.Triggers> <EventTrigger RoutedEvent="Binding.TargetUpdated"> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="(TextBlock.Opacity)" From="0.0" To="1.0" Duration="0:0:5"/> <DoubleAnimation Storyboard

XCode 9 crash on label localizer comment edition

回眸只為那壹抹淺笑 提交于 2019-12-12 11:13:03
问题 Context : Xcode 9.0 (9A235) When I try to edit my storyboard label's note for localizers (inserting Barty Crouch tag #bc-ignore! ), XCode 9 crashes. Also, trying to edit the font does nothing. Seems like a corrupted storyboard to me, certainly after a merge. Does anyone face the same issue ? EDIT, non-ambiguous question : Is there a fix to avoid the crash or do I have to edit the storyboard by hand? Process: Xcode [66619] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com