Search Results

Search found 2528 results on 102 pages for 'animation'.

Page 9/102 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Silverlight animation not smooth

    - by Andrej
    Hi, When trying to animate objects time/frame based in Silverlight (in contrast to using something like DoubleAnimation or Storyboard, which is not suitable e.g. for fast paced games), for example moving a spaceship in a particular direction every frame, the movement is jumpy and not really smooth. The screen even seems to tear. There seems to be no difference between CompositionTarget and DistpatcherTimer. I use the following approach (in pseudocode): Register Handler to Tick-Event of a DispatcherTimer In each Tick: Compute the elapsed time from the last frame in milliseconds Object.X += movementSpeed * ellapsedMilliseconds This should result in a smooth movement, right? But it doesn't. Here is an example (Controls: WASD and Mouse): Silverlight Game. Although the effect I described is not too prevalent in this sample, I can assure you that even moving a single rectangle over a canvas produces a jumpy animation. Does someone have an idea how to minimize this. Are there other approaches to to frame based animation exept using Storyboards/DoubleAnimations which could solve this? Edit: Here a quick and dirty approach, animating a rectangle with minimum code (Controls: A and D) Animation Sample Xaml: <Grid x:Name="LayoutRoot" Background="Black"> <Canvas Width="1000" Height="400" Background="Blue"> <Rectangle x:Name="rect" Width="48" Height="48" Fill="White" Canvas.Top="200" Canvas.Left="0"/> </Canvas> </Grid> C#: private bool isLeft = false; private bool isRight = false; private DispatcherTimer timer = new DispatcherTimer(); private double lastUpdate; public Page() { InitializeComponent(); timer.Interval = TimeSpan.FromMilliseconds(1); timer.Tick += OnTick; lastUpdate = Environment.TickCount; timer.Start(); } private void OnTick(object sender, EventArgs e) { double diff = Environment.TickCount - lastUpdate; double x = Canvas.GetLeft(rect); if (isRight) x += 1 * diff; else if (isLeft) x -= 1 * diff; Canvas.SetLeft(rect, x); lastUpdate = Environment.TickCount; } private void UserControl_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.D) isRight = true; if (e.Key == Key.A) isLeft = true; } private void UserControl_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.D) isRight = false; if (e.Key == Key.A) isLeft = false; } Thanks! Andrej

    Read the article

  • Expand and Shrink UIScrollView with animation

    - by Dilip Rajkumar
    I am having a UITableView inside a scrollview. So I am trying to do a accordion like component using UITableView. So I need to expand the UITableView to add more cell. In that case I have to increase the height of UIScrollView with a animation so that it matches the table animation. - (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row = [indexPath row]; BOOL preventReopen = NO; if (row == expandedRowIndex + 1 && expandedRowIndex != -1) return nil; [tableView beginUpdates]; if (expandedRowIndex != -1) { familyTableView.frame = CGRectMake(familyTableView.frame.origin.x, familyTableView.frame.origin.y, familyTableView.frame.size.width, 3*50+22); toolsTableView.frame = CGRectMake(toolsTableView.frame.origin.x, familyTableView.frame.origin.y + familyTableView.frame.size.height + 20, toolsTableView.frame.size.width, 4*50+22); myAccountTableView.frame = CGRectMake(myAccountTableView.frame.origin.x, toolsTableView.frame.origin.y + toolsTableView.frame.size.height + 20, myAccountTableView.frame.size.width, 2*50+22); settingsScrollView.contentSize = CGSizeMake(320, familyTableView.frame.size.height + toolsTableView.frame.size.height+ myAccountTableView.frame.size.height + 380); settingsScrollView.contentInset = UIEdgeInsetsMake(0, 0, familyTableView.frame.size.height + toolsTableView.frame.size.height+ myAccountTableView.frame.size.height + 380, 0); NSInteger rowToRemove = expandedRowIndex + 1; preventReopen = row == expandedRowIndex; if (row > expandedRowIndex) row--; expandedRowIndex = -1; [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:rowToRemove inSection:0]] withRowAnimation:UITableViewRowAnimationTop]; }else { familyTableView.frame = CGRectMake(familyTableView.frame.origin.x, familyTableView.frame.origin.y, familyTableView.frame.size.width, (3*50+22) + 100); toolsTableView.frame = CGRectMake(toolsTableView.frame.origin.x, familyTableView.frame.origin.y + familyTableView.frame.size.height + 20, toolsTableView.frame.size.width, 4*50+22); myAccountTableView.frame = CGRectMake(myAccountTableView.frame.origin.x, toolsTableView.frame.origin.y + toolsTableView.frame.size.height + 20, myAccountTableView.frame.size.width, 2*50+22); settingsScrollView.contentSize = CGSizeMake(320, familyTableView.frame.size.height + toolsTableView.frame.size.height+ myAccountTableView.frame.size.height + 380); settingsScrollView.contentInset = UIEdgeInsetsMake(0, 0, familyTableView.frame.size.height + toolsTableView.frame.size.height+ myAccountTableView.frame.size.height + 380, 0); } NSInteger rowToAdd = -1; if (!preventReopen) { rowToAdd = row + 1; expandedRowIndex = row; [tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:rowToAdd inSection:0]] withRowAnimation:UITableViewRowAnimationTop]; } [tableView endUpdates]; return nil; } I am not good at animation. Any help is greatly appreciated. What I need is when we do [tableView beginUpdates] we have to start animating the resize effect to UIScrollView and it should end when [tableView endUpdates] executes. So the Accordion executes flawlessly. Thanks in advance for any help..

    Read the article

  • Some animation requests in a Silverlight application

    - by Mohit Deshpande
    I am making a flash card application. It shows the question and then a textbox for user input, all wrapped in a border or rectangle. So what I want is an animation that "flips" the rectangle or border upside-down and then their is text on the "back". Also, I want my application to APPEAR transition from one card to another by "flying off" the screen then "another" card comes in to replace the other one in the opposite direction. But actually I'm want just a little animation of the border or rectangle moving off the screen then coming back in, but in the opposite direction.

    Read the article

  • Android animation clipping when going between layouts

    - by Ravedave
    I have a fairly complex layout. I use a relative layout as the root and then inside of it I have a few table views and some further nesting. When I animate an imageview between these layouts my image clips. I have a background on the parent layout and the animation looks like it's going under it. I have set android:clipChildren="false" and android:clipToPadding="false" on all of the layouts. I've also set anim.setZAdjustment(Animation.ZORDER_TOP); on all of my animations. What am I doing wrong?

    Read the article

  • jQuery animation queues

    - by OneNerd
    I am at a dead end, so hoping you jQuery gurus can help. I have a total of 10 elements (actually small images) on a page. I need to animate them like this: first 2 show up then the next 2 show up then the next 3 show up then the next 1 shows up then the last 2 show up So, I have added attributes to each one (sequence_num = "1" (or 2 or 3 etc) so I can easily choose via the $() which ones to animate using the animate() function.) My goal is to write a function that does the animation (I can do that - i think i have grasped the animate() function). What I am getting stuck on is how to delay the animation so the proper groups of objects are animated in before the next group starts. I have tried the queue parameter of the animate() function, but that doesn't seem to work for what I am trying to do. Does anyone have any experience with this?

    Read the article

  • Setting an delegate for the UIDatePicker animation?

    - by james.ingham
    If I had a date picker within an action sheet and called the following line: [datePicker setDate:newDate animated:YES]; And then my app hides the action sheet the date picker is within, is there anyway to set up a animation delegate so that the user see's the animation of the date picker first and then hides the action sheet? I have done this with UIView's by calling: [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(METHOD)]; However I can not see anything like this for the date picker. Thanks in advanced - James

    Read the article

  • iPhone "slide to unlock" animation

    - by Russ
    Any ideas as to how Apple implemented the "slide to unlock" (also, "slide to power off" is another identical example) animation? I thought about some sort of animating mask - but masking is not available on the iPhone OS for performance reasons. Is there some private API effect (like SuckEffect) that they might have used? A spotlight type of effect? Some Core Animation thing? Edit: It's definitely not a series of stills. I've seen examples of being edit a plist value or something and customize the string on jailbroken iphones.

    Read the article

  • Android SDK - Animation prevents further events on View like OnClick()

    - by Ron
    I have an ImageView which is animated via startAnimation() to slide it into the screen. It is visible and enabled in the XML. When I add a Handler for a delay or an onClick event, nothing happens. When I remove the startAnimation() everything works fine. Except the animation of course. Heres my code: balloon.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { view.setVisibility(View.GONE); } }); Animation dropDown = AnimationUtils.loadAnimation(context, R.anim.balloon_slide_down); dropDown.setStartOffset(1500); balloon.startAnimation(dropDown); Any ideas why that is? I'm quite frustrated by now... Thanks, Ron

    Read the article

  • slide animation skipped when using updatepanel callback

    - by superexsl
    Hey, I'm trying to use UpdatePanels and JQuery but the panels seem to cancel out the JQuery. I want the user to press the search button, have the system perform the search using AJAX and then display the search results by sliding down the div using JQuery. However, it seems that if there are any delays, (I put the thread to sleep for a second), then the results just appear instead of sliding down. If I remove the sleep thread the sliding animation is fine. I've got the code below to execute the JQuery once the AJAX is loaded: <script type="text/javascript"> var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_pageLoaded(showDiv); function showDiv(sender, args){ $("#results_bar").slideDown('slow'); } </script> Any ideas why the animation is skipped if there's a delay? Thanks

    Read the article

  • WPF Animation of border width

    - by Dave Perry
    I've got a dockpanel on my ui as follows; <DockPanel> <Border DockPanel.Dock="Top">Header</Border> <Border DockPanel.Dock="Bottom">My footer</Border> <Border DockPanel.Dock="Left">Menu</Border> <Border>Content</Border> </DockPanel> What I want to do is to have a storyboard animation to show / hide the Menu on the left-hand side. I've got my border to increase the width when it has loaded but I want a way to close / reopen it. I need a button somewhere but I want this to trigger the animation in the border control rather than itself. Ideally I was thinking of something like the Toolbox / Server Explorer in visual studio. Does anyone have any pointers / examples for getting started? Thanks

    Read the article

  • How to remove animation glitch ?

    - by hib
    Hi all , I am downloading and then parsing some data on separate thread and then updating my ui on main thread with the following code but in this scenario I am getting animation "glitch" . I have read this word somewhere . - (void)didFinishParsing2:(NSArray *)appList { [self performSelectorOnMainThread:@selector(handleLoadedApps2:) withObject:appList waitUntilDone:NO]; self.queue = nil; // we are finished with the queue and our ParseOperation } - (void)handleLoadedApps2:(NSArray *)loadedApps{ [activityLabel removeFromSuperview]; self.controller.MyArray = (MyClass *)[arrMyArray objectAtIndex:0]; [[MySharedClass sharedSource].detailSource setObject:self.controller.MyArray forKey:someObject]; self.controller.hidesBottomBarWhenPushed = YES; isPushed = YES; [[self navigationController] pushViewController:self.controller animated:YES]; } Can anyone tell me what I am doing wrong so that I can remove the animation glitch .

    Read the article

  • Some math and animation

    - by Ockonal
    Hello, I have a grass texture: I use it in my 2d-game. I want to animate it by code, without any predefined animations. The grass should interact with wind. So when the wind is stronger, the grass should stoop into need side more. First version of animation I made using sinusoid function, but such animation is a bit ugly, because the base of the grass moves left/right like all another part of picture. And with sinusoid I'm not able to regulate stoop of the image. Any advices?

    Read the article

  • UIView animation doesn't work first time

    - by BobC
    Hello everybody, I have a seachButton in the navigation bar which upon hitting calls following method: - (IBAction)search:(id)sender { if (nil == searchViewController) searchViewController = [[SearchViewController alloc] initWithNibName:@"SearchViewController" bundle:nil]; searchViewController.view.backgroundColor = [UIColor clearColor]; [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:searchViewController.view cache:NO]; [self.view addSubview:searchViewController.view]; [UIView commitAnimations]; } It should load SearchViewController.xib which contains a view with UISearchBar and two buttons. When I call the search method for the first time, the view appears very quickly with some weird animation, when I call it again, the animation is alright. Does anyone have a clue what could be wrong?

    Read the article

  • Handling inverse kinematics: animation blending or math?

    - by meds
    I've been working for the past four days on inverse kinematics for my game engine. I'm working on a game with a shoestring budget so when the idea of inverse kinematics came up I knew I had to make it such that the 3D models bones would be mathematically changed to appear to be stepping on objects. This is causing some serious problems with my animation, after it was technically implemented the animations started looking quite bad when the character was wlaking up inclines or steps even though mathematically the stepping was correct and was even smoothly interpolating. So I was wondering, is it actually possible to get a smooth efficient inverse kinematic system based exclusively on math where bones are changed or is this just a wild goose chase and I should either solve the inverse kinematics problem with animation blending or don't do it at all?

    Read the article

  • Can not add a animation to a UIImageView:

    - by Flocked
    Hello, Im trying to add a animation to a UIImageView, but it always fails. Why? Here is the code: UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); animationImage = [[UIImageView alloc]initWithImage:newImage]; [self.view addSubview:animationImage]; CATransition *animation = [CATransition animation]; [animation setDelegate:self]; [animation setDuration:0.35]; [animation setTimingFunction:UIViewAnimationCurveEaseInOut]; animation.type = @"pageCurl"; animation.fillMode = kCAFillModeForwards; animation.endProgress = 0.58; [animation setRemovedOnCompletion:NO]; [[animationImage layer] addAnimation:animation forKey:@"pageCurlAnimation"];

    Read the article

  • Starting Frame-By-Frame Animation

    - by OceanBlue
    Hi, I have a basic question about starting a frame-by-frame animation. When I call the AnimationDrawable.start() method from my code directly, it doesn't seem to work. public void onCreate(Bundle savedInstanceState) { ... mAnimation.start(); ... } But if I put this line inside the onClick() callback method of a button, pressing the buton starts the animation. Why doesn't this line work in the code? Thanks!

    Read the article

  • WPF UserControl Embedded Animation

    - by Matt B
    Hi all, I have a UserControl called Beetle.xaml which has animation makeing the legs move. So far so good. I added this to my Background.xaml page by decaring the xmlns and xaml as: xmlns:my="clr-namespace:Intellident.Liber8.GUI.Theme.Jungle" and <my:Beetle VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="180,0,0,175"> <UserControl.RenderTransform> <MatrixTransform x:Name="trnBeetle" /> </UserControl.RenderTransform> </my:Beetle> However I get errors telling me that I can't declare my:Name as I'm in the wrong scope. I can't declare my:Name as this doesn't exist. How do I do this, I want to create a path animation on the beetle to make him walk around... Ta, Matt. EDIT: THought I'd point out that both Beetle.xaml and Background.xaml live in Intellident.Liber8.GUI.Theme.Jungle namescope.

    Read the article

  • Onclick starts gif animation and .mp3, how to sync across browsers

    - by user2958163
    So I am using a text-based jplayer (http://jplayer.org/latest/demo-04/) that I want to sync with a gif animation. Onclick the text link does two things -1. feed the jplayer an mp3 and 2. trigger an animation (via SwapImage). It is important for these two to start at the same time. Right now, this works perfectly in chrome/firefox but in IE and mobile browsers the audio lags considerably. I have tried with the audio preloaded (it is a small 40K mp3) and it makes no difference. I dont think its a bandwidth problem because the problem is the same on repeat clicks. Any pointers on how I can resolve this...

    Read the article

  • How to do animation using swing and clojure ?

    - by Humberto Pinheiro
    I'm trying to animate a chess piece in a board. First I created a java.util.Timer object that "scheduleAtFixedRate" a TimerTask implemented as a proxy function. So I kept a record of the piece to move (piece-moving-record) and when it's apropriate (when the user move the piece using the mouse) the TimerTask proxy function should be test if the record is not nil and execute the piece-moving function. The piece-moving function just updates the x and y coordinates of the piece, according to a vector pre-calculated. I put a add-watch on the piece-moving-record so when it changes it should repaint the board (canvas). The paint method tests if this piece-moving-record is not nil to paint it. The problem is that the animation doesn't appear. The piece just jump to the destiny, without the movement between. There is some problem with the animation scheme ou there is a better way to do it?

    Read the article

  • UIView animation

    - by iphonedevnoob
    I have a UIView(first view) on top of which I would like to display another UIView(second view). I display the second view using animation which causes the second view to be displayed for about 3/4 of the iPhone screen. The first view is visible underneath the animated second view. I would like to make changes to the first view as the second view is displayed. Any ideas on how I can achieve this. Right now, the animation completes, the second view is displayed and then I can change the first view. I would like to change the layout of the first screen as the second screen is being displayed. Any help is much appreciated.

    Read the article

  • segmented controls mangled during initial transition animation

    - by dLux
    greetings and salutations folks, i'm relatively new to objective c & iphone programming, so bare with me if i've overlooked something obvious.. i created a simple app to play with the different transition animations, setting up a couple segmented controls and a slider.. (Flip/Curl), (left/right) | (up/down), (EaseInOut/EaseIn/EaseOut/Linear) i created a view controller class, and the super view controller switches between 2 instances of the sub class. as you can see from the following image, the first time switching to the 2nd instance, while the animation is occurring the segmented controls are mangled; i'd guess they haven't had enuff time to draw themselves completely.. http://img689.imageshack.us/img689/2320/mangledbuttonsduringtra.png they're fine once the animation is done, and any subsequent times.. if i specify cache:NO in the setAnimationTransition it helps, but there still seems to be some sort of progressive reveal for the text in the segmented controls; they still don't seem to be pre-rendered or initialized properly.. (and surely there's a way to do this while caching the view being transitioned to, since in this case the view isn't changing and should be cacheable.) i'm building my code based on a couple tutorials from a book, so i updated the didReceiveMemoryWarning to set the instanced view controllers to nil; when i invoke a memory warning in the simulator, i assume it's purging the other view, and it acts like a first transition after loading, the view being transitioned to appears just like the image above.. i guess it can't hurt to include the code (sorry if it's considered spamming), this is basically half of it, with a similar chunk following this in an else statement, for the case of the 2nd side being present, switching back to the 1st..: - (IBAction)switchViews:(id)sender { [UIView beginAnimations:@"Transition Animation" context:nil]; if (self.sideBViewController.view.superview == nil) // sideA is active, sideB is coming { if (self.sideBViewController == nil) { SideAViewController *sBController = [[SideAViewController alloc] initWithNibName:@"SideAViewController" bundle:nil]; self.sideBViewController = sBController; [sBController release]; } [UIView setAnimationDuration:sideAViewController.transitionDurationSlider.value]; if ([sideAViewController.transitionAnimation selectedSegmentIndex] == 0) { // flip: 0 == left, 1 == right if ([sideAViewController.flipDirection selectedSegmentIndex] == 0) [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES]; else [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES]; } else { // curl: 0 == up, 1 == down if ([sideAViewController.curlDirection selectedSegmentIndex] == 0) [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; else [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view cache:YES]; } if ([sideAViewController.animationCurve selectedSegmentIndex] == 0) [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; else if ([sideAViewController.animationCurve selectedSegmentIndex] == 1) [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; else if ([sideAViewController.animationCurve selectedSegmentIndex] == 2) [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; else if ([sideAViewController.animationCurve selectedSegmentIndex] == 3) [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [sideBViewController viewWillAppear:YES]; [sideAViewController viewWillDisappear:YES]; [sideAViewController.view removeFromSuperview]; [self.view insertSubview:sideBViewController.view atIndex:0]; [sideBViewController viewDidAppear:YES]; [sideAViewController viewDidDisappear:YES]; } any other tips or pointers about writing good clean code is also appreciated, i realize i still have a lot to learn.. thank u for ur time, -- d

    Read the article

  • jQuery - Stucked Animation

    - by v1n_vampire
    I'm kind of tired with Javascript long script for animation and decide to try jQuery, but it seems I'm stuck even at the simplest code. CSS: #menu {float: right; font: italic 16px/16px Verdana, Geneva, sans-serif;} ul#nav {list-style: none;} ul#nav li {float: left; padding-right: 10px;} ul#nav li a {color: white;} ul#subnav {float: right; list-style: none; padding: 0; display: none;} ul#subnav li {float: left; padding: 10px 5px; white-space: nowrap;} ul#subnav li a {color: white;} Script: $(document).ready(function() { $('.nav').hover(function() { $(this).find('#subnav').stop().animate({width:'toggle'},350); }); }); HTML: <div id="menu"> <ul id="nav"> <li class="nav"> <a href="#"><img src="images/icon-home.png" width="36" height="36"/></a> <ul id="subnav"> <li><a href="#">Home</a></li> </ul> </li> <li class="nav"> <a href="#"><img src="images/icon-signin.png" width="36" height="36"/></a> <ul id="subnav"> <li><a href="#">Sign In</a></li> </ul> </li> <li class="nav"> <a href="#"><img src="images/icon-register.png" width="36" height="36"/></a> <ul id="subnav"> <li><a href="#">Create Account</a></li> </ul> </li> <li class="nav" style="padding-right: 0;"> <a href="#"><img src="images/icon-mail.png" width="36" height="36"/></a> <ul id="subnav"> <li style="padding-right: 0;"><a href="#">Contact Us</a></li> </ul> </li> </ul> </div> Here's the sample page: http://v1n-vampire.com/dev/jq-animation-stuck If you continue to hover on the nav from left to right then back to left, eventually the animation will stuck. How to solve this? Thank you in advance.

    Read the article

  • WPF touch and slide/drag animation

    - by George
    I'm trying to create a pretty simple WPF interface, and from what I know this should be mostly possible using pure XAML. What I know I have a pretty basic understanding of WPF so far, however I have a decent grasp on XAML. I know or can work out how to put content in these panels. This isn't the topic of this question. What I don't know I don't know how to animate this interface. I'm not very proficient at binding, however again, that's not the topic of this question. The topic of this question is what would be the best way to animate panels 1-4 (images below) so that they may be dragged (via touch) into view. The number of panels here may be static for the purpose of this question. The panels (1-4) can be stack panels, grids or whatever; their content isnt important. What is important is the container that would contain all 4 panels. The complication in this animation is the other two containers here (Item One/TODO), as they're in the way of a smooth animation. If it makes this question simpler, the touch features can be ignored for now, and a simple button push can slide the containers across. One Two

    Read the article

  • iPhone SDK : UIImageView - Collapsing animation

    - by chris.o.
    Hi All, I'm trying to animating across the screen a horizontal bar with a color gradient. For simplicity, I chose to make a png of the fully extended bar, assign it to a UIImageView, and (attempt to) animate resizing of it using a UIView animation. The problem is that in the "closed" state of the Image, the portion of the image showing is not the part that I want. The image is arranged so that from L to R, a white to red color gradient occurs. The right side (about 20 pixels) is solid red and is the part I want to show when the bar is "collapsed". I'm trying to extend the image out by about 100 pixels to its full width. I referenced the "Buy Now" button example for my code as it seemed relevant" http://stackoverflow.com/questions/1669804/uibutton-appstore-buy-button-animation My code: [UIView beginAnimations:@"barAnimation" context:nil]; [UIView setAnimationDuration:0.6]; CGRect barFrame = bookBar.bounds; if (fExtendBar) { barFrame.origin.x -= 100; barFrame.size.width += 100; } else { barFrame.origin.x += 100; barFrame.size.width -= 100; } bookBar.frame = barFrame; [UIView commitAnimations]; I feel like this should be possible, maybe by setting an "offsetOfImage" to display in the UIImageView, but I can't seem to make it work. Also, I've noticed that the behavior is kind of consistent with what happens in Interface Builder when you resize an image. Then again, I would think there would be a way to override this behavior programmatically. Any suggestions (including other approaches) are welcome. Thanks, chris.o.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >