Search Results

Search found 224 results on 9 pages for 'storyboard'.

Page 1/9 | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Tools for game script / storyboard

    - by Pietro Polsinelli
    I am searching for a tool that will help in writing a game script. By "script" I mean the text core of a storyboard - without the drawing drafts, which may or may not be there (yet). What I'm thinking of will let write a piece of text of the script, define a simplified workflow from that step, and then define the text of next steps, and so on. Searching online, I found Inform http://inform7.com/ ("A Design System for Interactive Fiction Based on Natural Language") which in theory is exactly what I am searching for, but trying to use it it has this model of a space (a dungeon, a library) where you are picking up objects and exploring them. In my case I am designing more a Sims like game, the flow is entirely different. Considering non specific software, mind mapping tools miss the linearity of the process. What I am writing is a directed graph - simply a work-flow, but the way I want to design it is more text based than work-flow based. SO what I'm doing now is using a text editor, which I'll transform directly in code. Any suggestions?

    Read the article

  • Storyboard apply to all labels

    - by ThitoO
    Hi everyone ! I whant to apply a little storyboard to a collection of labels in my window. My storyboard is like that : <Storyboard x:Key="Storyboard1" AutoReverse="True" RepeatBehavior="Forever"> <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="label" Storyboard.TargetProperty="(Label.Foreground).(SolidColorBrush.Color)"> <SplineColorKeyFrame KeyTime="00:00:00.1000000" Value="#FFFFFF"/> </ColorAnimationUsingKeyFrames> </Storyboard> I have a window composed of that : <Grid Background="#FF000000"> <Viewbox HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Uniform"> <UniformGrid x:Name="grid" Background="#FF000000" /> </Viewbox> </Grid> When I want to start my storyboard I do that : Storyboard.SetTarget( _stb, myLabel ); _stb.Begin(); where _std is my storyboard loaded by the window's resources. The animation works fine, but on all labels (not only the one I want). I tried to switch SetTarget by SetTargetName but labels are created into my window by the constructor and names can not be founded when I try "SetTargetName". Do you have any ideas ? Thanks :) ------------ Edit : We asked me to be more descriptive -------------------------------------------------------------------- Label are not created directly in the xaml, they are created by the constructor of the window : public SpellerWindow(IKeyboard keyboard, int colomnNumber, SolidColorBrush background, SolidColorBrush foreground ) { InitializeComponent(); grid.Columns = colomnNumber; int i = 0; foreach( IKey key in keyboard.Zones.Default.Keys ) { Label lb = new Label(); lb.Foreground = foreground; lb.Name = "label"+(i++).ToString(); lb.Content = key.ActualKeys[keyboard.CurrentMode].UpLabel; lb.HorizontalAlignment = HorizontalAlignment.Center; lb.VerticalAlignment = VerticalAlignment.Center; Viewbox box = new Viewbox(); box.Stretch = Stretch.Fill; box.Child = lb; box.Tag = key; grid.Children.Add( box ); } } Animations are started by an event handler : void Highlighter_StartAnimation( object sender, HiEventArgs e ) { Storyboard stb; if( !_anims.TryGetValue( e.Step.Animation.Name, out stb ) ) { stb = (Storyboard)_window.FindResource( e.Step.Animation.Name ); _anims.Add( e.Step.Animation.Name, stb ); } DoAnimations( _zones[e.Step.Zone], stb ); } Finally, animations are started by DoAnimations : void DoAnimations( List<Label> labels, Storyboard stb ) { foreach( Label lb in labels ) { Storyboard.SetTarget( stb, lb ); stb.Begin(); } } I want to highlight a collection of labels, but all labels are flashing. I don't know why, but I try to create a label into the Xaml directly, and set a Storyboard.TargetName (bound to the name of the label) in the Xaml of the storyboard. And it's working ... Now you know everything. Thanks for you help :)

    Read the article

  • Wpf: Storyboard.TargetName works, but Setter TargetName doesn't.

    - by MainMa
    Hi, Let's say we have a XAML code like this: <Style TargetType="{x:Type ListBoxItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> <Border HorizontalAlignment="Center" VerticalAlignment="Center"> <Border.LayoutTransform> <!--We are rotating randomly each image. Selected one will be rotated to 45°.--> <RotateTransform Angle="{Binding RandomAngle}" x:Name="globalRotation"/> </Border.LayoutTransform> <Grid> <Image Source="{Binding ImageLocation}" Stretch="None" /> <TextBlock x:Name="title" Text="{Binding Title}" /> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter TargetName="title" Property="Visibility" Value="Visible"/> <!--The next line will not compile.--> <Setter TargetName="globalRotation" Property="Angle" Value="45"/> <Trigger.EnterActions> <BeginStoryboard> <Storyboard> <!--This compiles well.--> <DoubleAnimation Storyboard.TargetName="globalRotation" Storyboard.TargetProperty="Angle" To="45" Duration="00:00:03"/> </Storyboard> </BeginStoryboard> </Trigger.EnterActions> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> This code is intended to display a set of images in a listbox. Each image has a random rotation, but when selected, rotates to 45 degrees. Rotating selected image through a storyboard works well. I just specify Storyboard.TargetName and it rotates the image when selected (Trigger.ExitActions is omitted to make the code shorter). Now, if I want, instead of using a storyboard, assign 45 degrees value directly, I can't do that, because <Setter TargetName="globalRotation" Property="Angle" Value="45"/>: it compiles with "Cannot find the Trigger target 'globalRotation'. (The target must appear before any Setters, Triggers, or Conditions that use it.)" error. What happens? I suppose that Storyboard.TargetName is evaluated during runtime, so let me compile it. Is it right? How to make it work with just a setter, without using a storyboard?

    Read the article

  • Manipulating a Storyboard's target object

    - by slugster
    In the handler for the Completed event of a Storyboard, how do i get the element that the storyboard was being applied to? My Storyboard is part of an ItemTemplate: <ListBox x:Name="MyListBox" > <ListBox.ItemTemplate> <DataTemplate> <Grid x:Name="Container" Height="30" > <Grid.Resources> <Storyboard x:Name="FadeOut" BeginTime="0:0:7" Completed="FadeOut_Completed"> <DoubleAnimation From="1.0" To="0.0" Duration="0:0:3" Storyboard.TargetName="Container" Storyboard.TargetProperty="Opacity" /> </Storyboard> </Grid.Resources> [...snip...] </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> in the Completed event i want to grab the grid called Container so that i can do nasty things with its DataContext. Can this be done, or am i going about it the wrong way? Thanks :)

    Read the article

  • WPF Storyboard delay in playing wma files

    - by Rita
    I'm a complete beginner in WPF and have an app that uses StoryBoard to play a sound. public void PlaySound() { MediaElement m = (MediaElement)audio.FindName("MySound.wma"); m.IsMuted = false; FrameworkElement audioKey = (FrameworkElement)keys.FindName("MySound"); Storyboard s = (Storyboard)audioKey.FindResource("MySound.wma"); s.Begin(audioKey); } <Storyboard x:Key="MySound.wma"> <MediaTimeline d:DesignTimeNaturalDuration="1.615" BeginTime="00:00:00" Storyboard.TargetName="MySound.wma" Source="Audio\MySound.wma"/> </Storyboard> I have a horrible lag and sometimes it takes good 10 seconds for the sound to be played. I suspect this has something to do with the fact that no matter how long I wait - The sound doesn't get played until after I leave the function. I don't understand it. I call Begin, and nothing happens. Is there a way to replace this method, or StoryBoard object with something that plays instantly and without a lag?

    Read the article

  • Load view when button is clicked in Xcodes Storyboard

    - by dooonot
    I just started to use Storyboard in Xcode. I have a starting view that has some buttons inside. Is there a way to load a special view when a button is clicked? I only found this workaround: -(IBAction)loadRegistration:(id)sender { // load registration controller UIStoryboard *storyboard = self.storyboard; RegisterController *svc = [storyboard instantiateViewControllerWithIdentifier:@"RegisterController"]; [self presentViewController:svc animated:YES completion:nil]; }

    Read the article

  • Storyboard as timer in WPF

    - by Adrian
    Hi, I'm trying to do smooth animation in procedural code. For this (in Silverlight at least), it's recommended to use the Storyboard timer rather than a DispatcherTimer. So I use something like this: Storyboard _LoopTimer = new Storyboard(); public void StartAnimation() { _LoopTimer.Duration = TimeSpan.FromMilliseconds(0); _LoopTimer.Completed += new EventHandler(MainLoop); _LoopTimer.Begin(); } void MainLoop(object sender, EventArgs e) { // Do animation stuff here // Continue storyboard timer _LoopTimer.Begin(); } And in Silverlight, this works fine. But in WPF, I only hit MainLoop() once. Setting RepeatBehaviour to Forever doesn't help, either. So what's the right way to do this in WPF with a Storyboard? Thanks very much.

    Read the article

  • Storyboard elements are not sized properly on the device

    - by Joel Fischer
    In the storyboard, I am placing a table view element into a subclassed UIView. The element is not appearing on the iPad device I am running it on the same as it appears in the storyboard however. This also happens for additional content that I place into the storyboard. Below is a screenshot as it appears in the storyboard, as well as UI width/height information. And here is the description of the UI file running on the iPad. https://gist.github.com/4323186 (embedding it directly into the post is giving me problems) You'll notice that the tableview is explicitly set at 178 width, and is showing up in the description as 276 width. My initial thought was that perhaps a cell was forcing the parent to be larger (I'm very new to iOS UI development), but drilling into that shows the prototype cell it appears that the width is defined by it's parent at 178. The image views and label also are appearing in the incorrect spot, as shown in the second image below.

    Read the article

  • Apply Storyboard Animation to DataGridTemplateColumn depending on Binding value change

    - by Neo
    I have a DataGridTemplateColumn on a WPF DataGrid which has a binding to a double type. I wish to apply a Storyboard Animation when the value goes down and another Storyboard Animation when the value goes up. I've got the following code to start with: <dg:DataGridTemplateColumn Header="My Double"> <dg:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Path=MyDouble, NotifyOnTargetUpdated=True}" TargetUpdated="dgRates_TargetUpdated"> <TextBlock.Triggers> <EventTrigger RoutedEvent="Binding.TargetUpdated"> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:2" From="1.0" To="0.0" /> </Storyboard> </BeginStoryboard> </EventTrigger> </TextBlock.Triggers> </TextBlock> </DataTemplate> </dg:DataGridTemplateColumn.CellTemplate> </dg:DataGridTemplateColumn> How can I achieve this? Thanks.

    Read the article

  • New to iPhone Development - iOS5 Storyboard

    - by Peter
    I'm new here and pretty new to iOS development. My question is basically, should I learn the old school development methods or just learn how to do things using the latest tools (i.e. Storyboard)? I've had a go with the Storyboard feature of XCode 4.2 and it's very powerful. My only concern is that it requires iOS 5. I don't mind learning the old way of doing things but I've been having trouble finding tutorials/examples for XCode 4.2 that don't use the storyboard. An example would be the with my trouble finding a good tutorial on how to embed a Navigation Controller into a TabBarController. A lot of the material out there seems to be for older version of XCode. Using the storyboard I'm able to set this up with seconds but still haven't managed to get it working without it. So in short :) would you guys suggest I continue my project using the Storyboard or make the extra effort to do things a little more manually?

    Read the article

  • UiButton / IBAction - link from a RootView to mainView in Storyboard

    - by webschnecke
    I try to call the main ViewController on my storyboard. In my app there is a additional .h, .m file with no xib or storyboard. In this .m file T craeted a button: UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button addTarget:self action:@selector(home:)forControlEvents:UIControlEventTouchDown]; [button setTitle:@"Show View" forState:UIControlStateNormal]; button.frame = CGRectMake(80.0, 210.0, 160.0, 40.0); [self.view addSubview:button]; NSLog(@"Home-Button line 645"); This button should link to my main ViewController in the Storyboard. The view has the identifier HauptMenu. I got no error, but the view doesnt change to my main ViewController. What is wrong? - (IBAction)home:(id)sender { NSLog(@"Button was tapped"); ViewController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"HauptMenu"]; NSLog(@"1"); [viewController setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal]; NSLog(@"2"); [self.navigationController pushViewController:viewController animated:NO]; [viewController release]; NSLog(@"3"); }

    Read the article

  • WPF storyboard animation issue when using VisualBrush

    - by Flack
    Hey guys, I was playing around with storyboards, a flipping animation, and visual brushes. I have encountered an issue though. Below is the xaml and code-behind of a small sample I quickly put together to try to demonstrate the problem. When you first start the app, you are presented with a red square and two buttons. If you click the "Flip" button, the red square will "flip" over and a blue one will appear. In reality, all that is happening is that the scale of the width of the StackPanel that the red square is in is being decreased until it reaches zero and then the StackPanel where a blue square is, whose width is initially scaled to zero, has its width increased. If you click the "Flip" button a few times, the animation looks ok and smooth. Now, if you hit the "Reflection" button, a reflection of the red/blue buttons is added to their respective StackPanels. Hitting the "Flip" button now will still cause the flip animation but it is no longer a smooth animation. The StackPanels width often does not shrink to zero. The width shrinks somewhat but then just stops before being completely invisible. Then the other StackPanel appears as usual. The only thing that changed was adding the reflection, which is just a VisualBrush. Below is the code. Does anyone have any idea why the animations are different between the two cases (stalling in the second case)? Thanks. <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xml:lang="en-US" xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="WpfFlipTest.Window1" x:Name="Window" Title="Window1" Width="214" Height="224"> <Window.Resources> <Storyboard x:Key="sbFlip"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="redStack" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="0"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4" Storyboard.TargetName="blueStack" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00.8" Value="1"/> </DoubleAnimationUsingKeyFrames> </Storyboard> <Storyboard x:Key="sbFlipBack"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="blueStack" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="0"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4" Storyboard.TargetName="redStack" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00.8" Value="1"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </Window.Resources> <Grid x:Name="LayoutRoot" Background="Gray"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <StackPanel Name="redStack" Grid.Row="0" Grid.Column="0" RenderTransformOrigin="0.5,0.5"> <StackPanel.RenderTransform> <ScaleTransform/> </StackPanel.RenderTransform> <Border Name="redBorder" BorderBrush="Transparent" BorderThickness="4" Width="Auto" Height="Auto"> <Button Margin="0" Name="redButton" Height="75" Background="Red" Width="105" /> </Border> <Border Width="{Binding ElementName=redBorder, Path=ActualWidth}" Height="{Binding ElementName=redBorder, Path=ActualHeight}" Opacity="0.2" BorderBrush="Transparent" BorderThickness="4" Name="redRefelction" Visibility="Collapsed"> <Border.OpacityMask> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <LinearGradientBrush.GradientStops> <GradientStop Offset="0" Color="Black"/> <GradientStop Offset=".6" Color="Transparent"/> </LinearGradientBrush.GradientStops> </LinearGradientBrush> </Border.OpacityMask> <Border.Background> <VisualBrush Visual="{Binding ElementName=redButton}"> <VisualBrush.Transform> <ScaleTransform ScaleX="1" ScaleY="-1" CenterX="52.5" CenterY="37.5" /> </VisualBrush.Transform> </VisualBrush> </Border.Background> </Border> </StackPanel> <StackPanel Name="blueStack" Grid.Row="0" Grid.Column="0" RenderTransformOrigin="0.5,0.5"> <StackPanel.RenderTransform> <ScaleTransform ScaleX="0"/> </StackPanel.RenderTransform> <Border Name="blueBorder" BorderBrush="Transparent" BorderThickness="4" Width="Auto" Height="Auto"> <Button Grid.Row="0" Grid.Column="1" Margin="0" Width="105" Background="Blue" Name="blueButton" Height="75"/> </Border> <Border Width="{Binding ElementName=blueBorder, Path=ActualWidth}" Height="{Binding ElementName=blueBorder, Path=ActualHeight}" Opacity="0.2" BorderBrush="Transparent" BorderThickness="4" Name="blueRefelction" Visibility="Collapsed"> <Border.OpacityMask> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <LinearGradientBrush.GradientStops> <GradientStop Offset="0" Color="Black"/> <GradientStop Offset=".6" Color="Transparent"/> </LinearGradientBrush.GradientStops> </LinearGradientBrush> </Border.OpacityMask> <Border.Background> <VisualBrush Visual="{Binding ElementName=blueButton}"> <VisualBrush.Transform> <ScaleTransform ScaleX="1" ScaleY="-1" CenterX="52.5" CenterY="37.5" /> </VisualBrush.Transform> </VisualBrush> </Border.Background> </Border> </StackPanel> <Button Grid.Row="1" Click="FlipButton_Click" Height="19.45" HorizontalAlignment="Left" VerticalAlignment="Top" Width="76">Flip</Button> <Button Grid.Row="0" Grid.Column="1" Click="ReflectionButton_Click" Height="19.45" HorizontalAlignment="Left" VerticalAlignment="Top" Width="76">Reflection</Button> </Grid> </Window> Here are the button click handlers: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using System.Windows.Media.Animation; namespace WpfFlipTest { public partial class Window1 : Window { public Window1() { InitializeComponent(); } bool flipped = false; private void FlipButton_Click(object sender, RoutedEventArgs e) { Storyboard sbFlip = (Storyboard)Resources["sbFlip"]; Storyboard sbFlipBack = (Storyboard)Resources["sbFlipBack"]; if (flipped) { sbFlipBack.Begin(); flipped = false; } else { sbFlip.Begin(); flipped = true; } } bool reflection = false; private void ReflectionButton_Click(object sender, RoutedEventArgs e) { if (reflection) { reflection = false; redRefelction.Visibility = Visibility.Collapsed; blueRefelction.Visibility = Visibility.Collapsed; } else { reflection = true; redRefelction.Visibility = Visibility.Visible; blueRefelction.Visibility = Visibility.Visible; } } } } UPDATE: I have been testing this some more to try to find out what is causing the issue I am seeing and I believe I found what is causing the issue. Below I have pasted new xaml and code-behind. The new sample below is very similar to the original sample, with a few minor modifications. The xaml basically consists of two stack panels, each containing two borders. The second border in each stack panel is a visual brush (a reflection of the border above it). Now, when I click the "Flip" button, one stack panel gets its ScaleX reduced to zero, while the second stack panel, whose initial ScaleX is zero, gets its ScaleX increased to 1. This animation gives the illusion of flipping. There are also two textblocks which display the scale factor of each stack panel. I added those to try to diagnose my issue. The issue is (as described in the oringal post) that the flipping animation is not smooth. Every time I hit the flip button, the animation starts but whenever the ScaleX factor gets to around .14 to .16, the animation looks like it stalls and the stack panels never have there ScaleX reduced to zero, so they never totally disappear. Now, the strange thing is that if I change the Width/Height properties of the "frontBorder" and "backBorder" borders defined below to use explict values instead of Auto, such as Width=105 and Height=75 (to match the button in the border) everything works fine. The animation stutters the first two or three times I run it but after that the flips are smooth and flawless. (BTW, when an animation is run for the first time, is there something going on in the background, some sort of initialization, that causes it to be a little slow the first time?) Is it possible that the Auto Width/Height of the borders are causing the issue? I can reproduce it everytime but I am not sure why Auto Width/Height would be a problem. Below is the sample. Thanks for the help. <Window x:Class="FlipTest.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Window.Resources> <Storyboard x:Key="sbFlip"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="front" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="0"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.5" Storyboard.TargetName="back" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="1"/> </DoubleAnimationUsingKeyFrames> </Storyboard> <Storyboard x:Key="sbFlipBack"> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="back" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="0"/> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames BeginTime="00:00:00.5" Storyboard.TargetName="front" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="1"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </Window.Resources> <Grid x:Name="LayoutRoot" Background="White" ShowGridLines="True"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <StackPanel x:Name="front" RenderTransformOrigin="0.5,0.5"> <StackPanel.RenderTransform> <ScaleTransform/> </StackPanel.RenderTransform> <Border Name="frontBorder" BorderBrush="Yellow" BorderThickness="2" Width="Auto" Height="Auto"> <Button Margin="0" Name="redButton" Height="75" Background="Red" Width="105" Click="FlipButton_Click"/> </Border> <Border Width="{Binding ElementName=frontBorder, Path=ActualWidth}" Height="{Binding ElementName=frontBorder, Path=ActualHeight}" Opacity="0.2" BorderBrush="Transparent"> <Border.OpacityMask> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <LinearGradientBrush.GradientStops> <GradientStop Offset="0" Color="Black"/> <GradientStop Offset=".6" Color="Transparent"/> </LinearGradientBrush.GradientStops> </LinearGradientBrush> </Border.OpacityMask> <Border.Background> <VisualBrush Visual="{Binding ElementName=frontBorder}"> <VisualBrush.Transform> <ScaleTransform ScaleX="1" ScaleY="-1" CenterX="52.5" CenterY="37.5" /> </VisualBrush.Transform> </VisualBrush> </Border.Background> </Border> </StackPanel> <StackPanel x:Name="back" RenderTransformOrigin="0.5,0.5"> <StackPanel.RenderTransform> <ScaleTransform ScaleX="0"/> </StackPanel.RenderTransform> <Border Name="backBorder" BorderBrush="Yellow" BorderThickness="2" Width="Auto" Height="Auto"> <Button Margin="0" Width="105" Background="Blue" Name="blueButton" Height="75" Click="FlipButton_Click"/> </Border> <Border Width="{Binding ElementName=backBorder, Path=ActualWidth}" Height="{Binding ElementName=backBorder, Path=ActualHeight}" Opacity="0.2" BorderBrush="Transparent"> <Border.OpacityMask> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <LinearGradientBrush.GradientStops> <GradientStop Offset="0" Color="Black"/> <GradientStop Offset=".6" Color="Transparent"/> </LinearGradientBrush.GradientStops> </LinearGradientBrush> </Border.OpacityMask> <Border.Background> <VisualBrush Visual="{Binding ElementName=backBorder}"> <VisualBrush.Transform> <ScaleTransform ScaleX="1" ScaleY="-1" CenterX="52.5" CenterY="37.5" /> </VisualBrush.Transform> </VisualBrush> </Border.Background> </Border> </StackPanel> <Button Grid.Row="1" Click="FlipButton_Click" Height="19.45" HorizontalAlignment="Left" VerticalAlignment="Top" Width="76">Flip</Button> <TextBlock Grid.Row="2" Grid.Column="0" Foreground="DarkRed" Height="19.45" HorizontalAlignment="Left" VerticalAlignment="Top" Width="76" Text="{Binding ElementName=front, Path=(UIElement.RenderTransform).(ScaleTransform.ScaleX)}"/> <TextBlock Grid.Row="3" Grid.Column="0" Foreground="DarkBlue" Height="19.45" HorizontalAlignment="Left" VerticalAlignment="Top" Width="76" Text="{Binding ElementName=back, Path=(UIElement.RenderTransform).(ScaleTransform.ScaleX)}"/> </Grid> </Window> Code-behind: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using System.Windows.Media.Animation; namespace FlipTest { /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); } bool flipped = false; private void FlipButton_Click(object sender, RoutedEventArgs e) { Storyboard sbFlip = (Storyboard)Resources["sbFlip"]; Storyboard sbFlipBack = (Storyboard)Resources["sbFlipBack"]; if (flipped) { sbFlipBack.Begin(); flipped = false; } else { sbFlip.Begin(); flipped = true; } } } }

    Read the article

  • Storyboard editor layout confusion

    - by drew
    I am having layout problems with the storyboard editor with a fairly simple screen. I have a UIViewController to which I have added a 320x440 UIScrollView at 0,0 followed by a 320x20 UIProgressBar at 0,440. It looks fine in Storyboard editor. I'm not entirely sure how the 20 pixel status bar at the top of the screen is accommodated given the CGRect frame coordinates that Storyboard calculates. On loading ( in -(void)viewDidLoad ), the UIScrollView frame seems to be set to 320x460 pixels at 0,0 but the UIProgressBar is still 320x20 at 0,440. When I add subviews to the UIScrollView, (UIImageViews in particular), they get stretched and get clipped on the screen because although the UIScrollView thinks it is 460 pixels high, it only has 440 pixels of screen to display in. Can anyone point me to a solution? Thanks

    Read the article

  • Play animation (storyboard) backwards

    - by drasto
    Is there a simple way to play some StoryBoad backward (reversed) ? As there is a method Storyboard.Begin() I would expect that there is some method like "Storyboard.BeginReversed()" but I cannot find it. If there is no way to play an animation backwards that I have to write for most of my animations complementary animations. That smells bad to me (code duplication of some kind). Basically I just animate a Grid that shows and than hides.

    Read the article

  • WPF Storyboard flicker issue

    - by Vinjamuri
    With the code below, the control flickers whenever the image is changed for MouseOver/MousePressed? I am using Storyboard and Double animation.The image display is very smooth with WPF Triggers but not with Storyboard. Can anyone help me to fix this issue? <Style TargetType="{x:Type local:ButtonControl}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:ButtonControl}"> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgNormal" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> <VisualState x:Name="MouseOver"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgOver" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> <VisualState x:Name="Disabled"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgDisable" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> <VisualState x:Name="Pressed"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgPress" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid> <Border x:Name="imgNormal" Opacity="0"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalImage}" Stretch="UniformToFill"/> </Border> </Grid> <Grid> <Border x:Name="imgOver" Opacity="0"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MouseOverImage}" Stretch="UniformToFill"/> </Border> </Grid> <Grid> <Border x:Name="imgDisable" Opacity="0"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DisableImage}" Stretch="UniformToFill"/> </Border> </Grid> <Grid> <Border x:Name="imgPress" Opacity="0"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MousePressImage}" Stretch="UniformToFill"/> </Border> </Grid> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • WPF Storyboard issue

    - by Vinjamuri
    In the following template, the button is displayed with Normal image when the application is started, but when the mouse is over, the button doesn't get changed to mouse over image. Appreciate your help!!! I want some solution without major changes in the design. <Style TargetType="{x:Type local:ButtonControl}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:ButtonControl}"> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgNormal" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> <VisualState x:Name="MouseOver"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgNormal" Storyboard.TargetProperty="Opacity" To="0" /> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgOver" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> <VisualState x:Name="Disabled"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgDisable" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> <VisualState x:Name="Pressed"> <Storyboard> <DoubleAnimation Duration="00:00:00.20" Storyboard.TargetName="imgPress" Storyboard.TargetProperty="Opacity" To="1" /> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid> <Border x:Name="imgNormal"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=NormalImage}" Opacity="1" Stretch="UniformToFill"/> </Border> </Grid> <Grid> <Border x:Name="imgOver"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MouseOverImage}" Opacity="0" Stretch="UniformToFill"/> </Border> </Grid> <Grid> <Border x:Name="imgDisable"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DisableImage}" Opacity="0" Stretch="UniformToFill"/> </Border> </Grid> <Grid> <Border x:Name="imgPress"> <Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MousePressImage}" Opacity="0" Stretch="UniformToFill"/> </Border> </Grid> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>

    Read the article

  • Storyboard Bug - iOS 5.1 - Xcode 4.3.3

    - by user1505431
    In my iOS project (using xcode only), I continue to run into a problem where layout presented to me in the storyboard editor becomes automatically modified after some change (which I have not been able to specifically determine). The problem is as follows: The TabBarController has for whatever reason started displaying in landscape orientation. Some of the NavigationControllers have also done the same thing. I can no longer see or edit the navigation bar on my nested views. I can no longer see of edit the tab bar on the views of the resp. tab bar items. Everything works properly when I run the app in my simulator. If I had set it up prior to this change in default display settings, it still works just fine. Here is a screen shot of the problem: My storyboard has consistently presented me with this bug throughout the course of my project. I have fixed it once by resetting via git and another time by rebuilding the entire storyboard. Both solutions worked for an extended period of time, but I would rather have a permanent solution. Any input would be helpful.

    Read the article

  • WPF Storyboard works well, except for the first time it runs. Why?

    - by sofri
    Hi, I'm doing a Surface Application. And there I have something like a bulletin board where little cards with news on it are pinned on. On click they shall fly out of the board and scale bigger. My storyboard works well, except for the first time it runs. It's not a smooth animation then but it scales to its final size immediately and it's the same with the orientation-property. Just the center-property seems to behave correctly. This is an example for one of my Storyboards doing that: Storyboard stb = new Storyboard(); PointAnimation moveCenter = new PointAnimation(); DoubleAnimationUsingKeyFrames changeWidth = new DoubleAnimationUsingKeyFrames(); DoubleAnimationUsingKeyFrames changeHeight = new DoubleAnimationUsingKeyFrames(); DoubleAnimationUsingKeyFrames changeOrientation = new DoubleAnimationUsingKeyFrames(); moveCenter.From = News1.ActualCenter; moveCenter.To = new Point(250, 400); moveCenter.Duration = new Duration(TimeSpan.FromSeconds(1.0)); moveCenter.FillBehavior = FillBehavior.Stop; stb.Children.Add(moveCenter); Storyboard.SetTarget(moveCenter, News1); Storyboard.SetTargetProperty(moveCenter, new PropertyPath(ScatterViewItem.CenterProperty)); changeWidth.Duration = TimeSpan.FromSeconds(1); changeWidth.KeyFrames.Add(new EasingDoubleKeyFrame(266, KeyTime.FromTimeSpan(new System.TimeSpan(0, 0, 1)))); changeWidth.FillBehavior = FillBehavior.Stop; stb.Children.Add(changeWidth); Storyboard.SetTarget(changeWidth, News1); Storyboard.SetTargetProperty(changeWidth, new PropertyPath(FrameworkElement.WidthProperty)); changeHeight.Duration = TimeSpan.FromSeconds(1); changeHeight.KeyFrames.Add(new EasingDoubleKeyFrame(400, KeyTime.FromTimeSpan(new System.TimeSpan(0, 0, 1)))); changeHeight.FillBehavior = FillBehavior.Stop; stb.Children.Add(changeHeight); Storyboard.SetTarget(changeHeight, News1); Storyboard.SetTargetProperty(changeHeight, new PropertyPath(FrameworkElement.HeightProperty)); changeOrientation.Duration = TimeSpan.FromSeconds(1); changeOrientation.KeyFrames.Add(new EasingDoubleKeyFrame(0, KeyTime.FromTimeSpan(new System.TimeSpan(0, 0, 1)))); changeOrientation.FillBehavior = FillBehavior.Stop; stb.Children.Add(changeOrientation); Storyboard.SetTarget(changeOrientation, News1); Storyboard.SetTargetProperty(changeOrientation, new PropertyPath(ScatterViewItem.OrientationProperty)); stb.Begin(this); News1.Center = new Point(250, 400); News1.Orientation = 0; News1.Width = 266; News1.Height = 400; Pin1.Visibility = Visibility.Collapsed; news1IsOutside = true; Scroll1.IsEnabled = true; What's wrong with it?

    Read the article

  • How to construct a flowchart/storyboard in a Func Spec

    - by PeterQ
    Hey I'm a bit embarrassed to write a post on this topic, but I would appreciate the help. At my school, the CS kids (myself included) have created a nice, little program that is built for incoming Chem/Bio students. It consists of several modules that reviews topics they should have a firm grasp on before they start their classes. It's a nice tool since it cuts down on reviewing the material in class but also allows the students to do a quick diagnostic to fix any problems. Now, I'm in charge of constructing a simple interface that reports on the progress of the group and individual students. The interface is pretty simple. It's just a window that pops up, and it has three tabs: the first tab is a "cumulative" report of all of students. The secnod tab has a drop down box that lists the students and once a student is selected, a report for him/her comes up. And the third tab is simply a description of all of the terms used in the 1st and 2nd tabs. Now, I'm trying to be a good CS student and write a func. spec for my interface. My problem comes with the fact that I'd like to insert a little flowchart using Visio. Problem is, and I'm quite embarrassed to admit this, I don't know how to construct the flowchart/storyboard. For instance, I know I start with a "Start/Click Icon" in a rectangle. Then where do I go? Do I draw three arrrows (one going to each tab) and then describing what goes on? In tab one, the only thing that happens is that the user will select a "sort" method in the drop down box. This will sort the list. The End. Similarly, if the user selects the second tab, then he will go to a drop down box with the student names. Selecting a name will bring up student info. And the third tab is just a list of unfamiliar terms coming from the first or second tab. I wanted to storyboard/flowchart what I'm doing, but I'm unclear how to go about it. Any help would be appreciated! (Just to clarify, I'm not having trouble with using Visio, but I don't know how one goes about construct a storyboard or determining the procedure for constructing one)

    Read the article

  • How to avoid Modal Storyboard infinite loop

    - by misthills
    I've written a number of iOS applications a year ago on an old version of Xcode. I've just started a new project and discovered the storyboard feature in the latest Xcode. It turns out this is perfect for the application I am writing as it consists of ~30 interlinked screens. My question is, how do I structure my storyboard and segues to allow my application to follow a circular path through my screens. I have seen a number of examples that simply segue screen 1 to screen 2 and then screen 2 to screen 1 using the modal option. This clearly works but when I debug an application built this way, it instantiates a new instance of each screen (view controller) for every segue performed. In the diagram below (apologies, I drew a nice picture but due to my newbie status, was not able to post it), how do I go from screen 1 to screen 2 to screen 3 and back to original screen 1 without creating a new instance? // Screen 1 --> Screen 2 --> Screen3 // ^ | // | | // +-------------------------+

    Read the article

  • Unable to call storyboard from xib

    - by Shruti Kapoor
    I am new to iOS development. I am trying to connect to a storyboard from xib file. My xib View Controller has a "Login" which if successful should connect to storyboard. I have googled and searched on stackoverflow for a solution and I am using this code that is given everywhere: UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil]; YourViewController * yourView = (YourViewController *)[storyboard instantiateViewControllerWithIdentifier:@"identifier ID"]; I have created an identifier for my storyboard as well. However, I am not being redirected to the storyboard no matter what I try. When the login finishes, I go back to my main View Controller (xib). I should be instead redirected to the storyboard. Here is what my code looks like in a file called ProfileTabView.m: -(void) loginViewDidFinish:(NSNotification*)notification { [[NSNotificationCenter defaultCenter] removeObserver:self]; UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil]; ProfileTabView * yourView = (ProfileTabView *)[storyboard instantiateViewControllerWithIdentifier:@"myID"]; } I have implemeted this code in the function that gets called once the login is successful. However, the storyboard "Storyboard" never gets called. Am i doing this right? Am I supposed to be writing this code anywhere else? Thanks a lot for any help :)

    Read the article

  • Implementation of Nib project to Storyboard, Xcode

    - by Blake Loizides
    I have made a tabbed bar application in storyboard in xcode. I,m new to xcode. I got a Sample TableView XIB project from apple that I edited to my needs,The project has a UITableView that I Customized with Images, And with help of a certain forum member I was able to link up each image to a New View Controller. I tried to port or integrate My Nib Project Code to my StoryBoard Tabbed Bar Application.I thought I had everything right had to comment out a few things to get no errors, But the project only goes to a Blank Table View. Below are 2 links, 1 to my StoryBoard Tabbed Bar Application with the Table Code that I tried to integrate and the other My Successful Nib Project. Also is some code and pictures. If anybody has some free time and does not mind to help I would be extremely grateful for any input given. link1 - Storyboard link2 - XIB DecorsViewController_iPhone.m // // TableViewsViewController.m // TableViews // // Created by Axit Patel on 9/2/10. // Copyright Bayside High School 2010. All rights reserved. // #import "DecorsViewController_iPhone.h" #import "SelectedCellViewController.h" @implementation DecorsViewController_iPhone #pragma mark - Synthesizers @synthesize sitesArray; @synthesize imagesArray; #pragma mark - View lifecycle // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { // Load up the sitesArray with a dummy array : sites NSArray *sites = [[NSArray alloc] initWithObjects:@"a", @"b", @"c", @"d", @"e", @"f", @"g", @"h", nil]; self.sitesArray = sites; //[sites release]; UIImage *PlumTree = [UIImage imageNamed:@"a.png"]; UIImage *CherryRoyale = [UIImage imageNamed:@"b.png"]; UIImage *MozambiqueWenge = [UIImage imageNamed:@"c.png"]; UIImage *RoyaleMahogany = [UIImage imageNamed:@"d.png"]; UIImage *Laricina = [UIImage imageNamed:@"e.png"]; UIImage *BurntOak = [UIImage imageNamed:@"f.png"]; UIImage *AutrianOak = [UIImage imageNamed:@"g.png"]; UIImage *SilverAcacia = [UIImage imageNamed:@"h.png"]; NSArray *images = [[NSArray alloc] initWithObjects: PlumTree, CherryRoyale, MozambiqueWenge, RoyaleMahogany, Laricina, BurntOak, AutrianOak, SilverAcacia, nil]; self.imagesArray = images; //[images release]; [super viewDidLoad]; } #pragma mark - Table View datasource methods // Required Methods // Return the number of rows in a section - (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section { return [sitesArray count]; } // Returns cell to render for each row - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"CellIdentifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; // Configure cell NSUInteger row = [indexPath row]; // Sets the text for the cell //cell.textLabel.text = [sitesArray objectAtIndex:row]; // Sets the imageview for the cell cell.imageView.image = [imagesArray objectAtIndex:row]; // Sets the accessory for the cell cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; // Sets the detailtext for the cell (subtitle) //cell.detailTextLabel.text = [NSString stringWithFormat:@"This is row: %i", row + 1]; return cell; } // Optional // Returns the number of section in a table view -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { return 1; } #pragma mark - #pragma mark Table View delegate methods // Return the height for each cell -(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 78; } // Sets the title for header in the tableview -(NSString *) tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { return @"Decors"; } // Sets the title for footer -(NSString *) tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section { return @"Decors"; } // Sets the indentation for rows -(NSInteger) tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath { return 0; } // Method that gets called from the "Done" button (From the @selector in the line - [viewControllerToShow.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(dismissView)] autorelease]];) - (void)dismissView { [self dismissViewControllerAnimated:YES completion:NULL]; } // This method is run when the user taps the row in the tableview - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; SelectedCellViewController *viewControllerToShow = [[SelectedCellViewController alloc] initWithNibName:@"SelectedCellViewController" bundle:[NSBundle mainBundle]]; [viewControllerToShow setLabelText:[NSString stringWithFormat:@"You selected cell: %d - %@", indexPath.row, [sitesArray objectAtIndex:indexPath.row]]]; [viewControllerToShow setImage:(UIImage *)[imagesArray objectAtIndex:indexPath.row]]; [viewControllerToShow setModalPresentationStyle:UIModalPresentationFormSheet]; [viewControllerToShow setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal]; [viewControllerToShow.navigationItem setRightBarButtonItem:[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(dismissView)]]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:viewControllerToShow]; viewControllerToShow = nil; [self presentViewController:navController animated:YES completion:NULL]; navController = nil; // UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Tapped row!" // message:[NSString stringWithFormat:@"You tapped: %@", [sitesArray objectAtIndex:indexPath.row]] // delegate:nil // cancelButtonTitle:@"Yes, I did!" // otherButtonTitles:nil]; // [alert show]; // [alert release]; } #pragma mark - Memory management - (void)didReceiveMemoryWarning { NSLog(@"Memory Warning!"); [super didReceiveMemoryWarning]; } - (void)viewDidUnload { self.sitesArray = nil; self.imagesArray = nil; [super viewDidUnload]; } //- (void)dealloc { //[sitesArray release]; //[imagesArray release]; // [super dealloc]; //} //@end //- (void)viewDidUnload //{ // [super viewDidUnload]; // Release any retained subviews of the main view. //} - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } else { return YES; } } @end DecorsViewController_iPhone.h #import <UIKit/UIKit.h> @interface DecorsViewController_iPhone : UIViewController <UITableViewDelegate, UITableViewDataSource> { NSArray *sitesArray; NSArray *imagesArray; } @property (nonatomic, retain) NSArray *sitesArray; @property (nonatomic, retain) NSArray *imagesArray; @end SelectedCellViewController.m #import "SelectedCellViewController.h" @implementation SelectedCellViewController @synthesize labelText; @synthesize image; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { } return self; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } #pragma mark - View lifecycle - (void)viewDidLoad { [super viewDidLoad]; [label setText:self.labelText]; [imageView setImage:self.image]; } - (void)viewDidUnload { self.labelText = nil; self.image = nil; // [label release]; // [imageView release]; [super viewDidUnload]; } - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } @end SelectedCellViewController.h @interface SelectedCellViewController : UIViewController { NSString *labelText; UIImage *image; IBOutlet UILabel *label; IBOutlet UIImageView *imageView; } @property (nonatomic, copy) NSString *labelText; @property (nonatomic, retain) UIImage *image; @end

    Read the article

  • Xcode 5 - remove storyboard and start app with a .xib

    - by Lucy
    I've tried to follow the instructions on this Question. But I must not be doing something correctly because I am still getting a SIGABRT before I even get into the ViewController methods. Here are the steps: Copied all items on the view in the story board and pasted into the new xib view. Copied all contents of .h and .m view controller files into the new ones for the xib. Changed the Main nib file base name to the new xib name in the info.plist file. Tried to change the owner but I don't know if I'm doing that correctly. Edited the appdelegate didFinishLaunchingWithOptions file as follows: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] ; // Override point for customization after application launch. TestViewController *test = [[TestViewController alloc] initWithNibName:@"TestViewController" bundle:nil]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:test]; self.window.rootViewController = nav; [self.window makeKeyAndVisible]; return YES; } I even tried to start with an empty project like one of the last posts suggested and still get a SIGABRT when I try to run. Has Apple made it impossible to remove the storyboard? I'm creating an SDK. I don't want a storyboard. But I do need one xib that is rotatable. Help?

    Read the article

  • UITableView overlaps with NavigationBar in Storyboard Setting on first run

    - by Evils
    I know this seems to be a duplicate question which has been around here many many times, but believe me, I tried all iOS7 and earlier fixes which sets the Layout to a different Edge configuration without any change. My Storyboard looks like this: -> Navigation Controller -> Tab Bar Controller -> MyTableViewController -> VCForCellOne With the first run of my application the UITableView overlaps with the source NavigationController as shown here: After clicking on one of my Cells which pushes the corresponding ViewController to the NavigationController and going back again, everything looks fine as shown here: So everything is as it should be after once pushing another ViewController to the NavigationController and then going back. Switching from Portrait to Landscape and back also fixes the layout problem and everything is layed out as it should be. My ViewController within the Storyboard looks like this: I left it the default value, so I don't know what goes wrong here. I hope you understand my problem here. There's no custom class ViewController here, so no additional code which messes up something here. Any help highly appreciated!

    Read the article

  • WP7 How to use a Storyboard

    - by Subby
    I wish to stop using the DispatcherTimer to show animations as that is extremely unpredictable. Instead, I want to start using a Storyboard as that is apparently the best and efficient way to animate controls. I have tried searching for Tutorials but have not, unfortunately, stumbled on one yet. Can anyone please advice me where I can begin? For example, "moving an image across the screen" and then "moving many images at the same time whilst rotating them". Any help is highly appreciated.

    Read the article

1 2 3 4 5 6 7 8 9  | Next Page >