uiviewanimation

Previous segue repeats on time on different button

拟墨画扇 提交于 2019-12-13 07:25:37
问题 I'll try to explain you my problem at my best.I'm trying to build a kind of schedule using a circular animation. I have 2 views: the first one contains 6 buttons with the titles from MONDAY to SATURDAY. When the user clicks on a button it will present modally the second view, which contains only one button with no title; this second view will take the backgroundColor and the title of the button from the previous VC: ScheduleDaysViewController. In the second view ,if the user clicks on the

Animating UILabel Fade In/Out

天大地大妈咪最大 提交于 2019-12-13 06:41:51
问题 I am going to end up with an array of RSS feeds, and would like a label or some such to display them at the bottom of the view. I would like to animate through each feed in the array. This is what i have so far to animate, which, works for the fade, but only animates the last item of the array. feed = [[UILabel alloc] initWithFrame:CGRectMake(0,380,320,43)]; [self.view addSubview:feed]; feed.alpha=1; NSArray *feeds = [NSArray arrayWithObjects:[NSString stringWithFormat:@"1234567"],[NSString

How to add parallax effect in auto layout

我怕爱的太早我们不能终老 提交于 2019-12-13 05:59:14
问题 I am using auto layout with size class. I want to add parallax effect on UITableViewCell so i ref. following links https://github.com/fernandospr/FSParallaxTableView https://github.com/jberlana/JBParallaxCell but they didn't use auto layout , any idea how to apply parallax effect to imageView when size class is on and auto layout is used. 回答1: With auto layout its really easy to add parallax in scrollview (or a tableview). The gist is that apart from other constraints we add a vertical centre

Unable to minimize subview alongside mainView during animation

陌路散爱 提交于 2019-12-13 03:39:38
问题 I have two views, videoView (which is the mainView) and subVideoView (which is the subView of mainView). I am trying to minimize both views using animation at the same time, as shown in the below code. I am able to minimize the videoView (i.e mainView) and not the subVideoView. However, when I hide code for minimising videoView (i.e mainView), I am able to minimise the subVideoView. I believe it has to do something with the way I am animating. Can some one please advice how I can minimise

Why are sequential UIView animations displayed concurrently?

筅森魡賤 提交于 2019-12-13 03:10:24
问题 I've written some code that moves some objects around on the screen in sequence. As each object finishes moving, the next starts. The code is structured similarly to this: Model: moveObject { // Code to move the object ... [delegate moved:self]; } Delegate: moved:(MyClass *)o { UIView* v = [self viewForObject:o]; [UIView animateWithDuration:1.0 animations:^{ [v setCenter: [model center]]; } completion:^(BOOL finished){ // Move object [model moveObject]; }]; } Although the code seems to run

non UIView animation: animations not playing sometimes, UIView animation: working fine

試著忘記壹切 提交于 2019-12-12 09:46:08
问题 Sometimes when I run my app on the device, I guess about 20% of the time, animations such as: [tableView setEditing:NO animated:YES]; [tableView setContentOffset:rect animated:YES]; and [viewController0 pushViewController:viewController1 animated:YES]; do not animate but instantly change. But animations such as: [UIView animateWithDuration:0.2 animations:^{ // do something } completion:^(BOOL finished) { // do something else }]; Work fine. Has this happened to anybody else? Not sure what

How do i wait until an animation in a different class is finished before continuing?

无人久伴 提交于 2019-12-12 09:39:32
问题 I have the simple code of: [otherClass doMethodOneWhichHasAnimation]; and that animation lasts 0.8 seconds. Followed by code that pushes a viewcontroller: SchemeView *schemeView = [[SchemeView alloc] init]; [self.navigationController pushViewController:schemeView animated:YES]; [schemeView release]; The problem is, it pushes the viewcontroller without waiting, and I'd like it to wait. Doing delay just delays the whole thing, including the first animation from starting. How can i get it to

Multiple UIView Animations

让人想犯罪 __ 提交于 2019-12-12 09:27:01
问题 I am trying to perform multiple UIView animations one after the other. However, I've heard that it's bad practice to perform multiple UIView animations one after the other, and that I should instead use Core Animation. I tried this code: //First Animation [UIView beginAnimations:@"animation1" context:nil]; [UIView setAnimationDuration:2]; nwView.backgroundColor = [UIColor redColor]; nwView.frame = CGRectMake(CGRectGetMidX(screenSize), CGRectGetMinY(screenSize), width, height); nwView

Cells disappearing during animation of UITableView

只谈情不闲聊 提交于 2019-12-12 08:11:30
问题 I have a normal UITableView in my UIViewController , constrained to fullscreen. This tableView has a custom interactive tableHeaderView . The tableHeaderView is dynamic in size, and expands on its own. The headerView has a textField, and will change its own size depending on wether the textField has focus or not. The problem is that the cells at the bottom of the screen aren't always animating correctly when changing the size of the tableHeaderView. I am calling tableView.beginUpdates() and

Rotate a UIView clockwise for an angle greater than 180 degrees

泄露秘密 提交于 2019-12-12 08:08:02
问题 I'm animating a clock arm from pointing towards 12 o'clock to the current time. If it is say, 11 o'clock, I want the arm to rotate clockwise to the 11 o'clock position. But of course if I use: CGAffineTransform rotation = CGAffineTransformMakeRotation(2*M_PI*11/12); [UIView animateWithDuration:3.0 animations:^{ clockArm.transform = rotation; }]; the rotation goes counterclockwise. I tried: CGFloat angle = 2*M_PI*11/12; CGAffineTransform firstRotation = CGAffineTransformMakeRotation(M_PI-0.001