¡@

Home 

2014/10/15 ¤U¤È 10:04:33

iphone Programming Glossary: beginanimations

How to make a UITextField move up when keyboard is present

http://stackoverflow.com/questions/1126726/how-to-make-a-uitextfield-move-up-when-keyboard-is-present

the view up down whenever the keyboard is shown dismissed void setViewMovedUp BOOL movedUp UIView beginAnimations nil context NULL UIView setAnimationDuration 0.3 if you want to slide up the view CGRect rect self.view.frame..

iPhone Keyboard Covers UITextField

http://stackoverflow.com/questions/1247113/iphone-keyboard-covers-uitextfield

movementDuration 0.3f tweak as needed int movement up movementDistance movementDistance UIView beginAnimations @ anim context nil UIView setAnimationBeginsFromCurrentState YES UIView setAnimationDuration movementDuration..

Custom animation for pushing a UIViewController

http://stackoverflow.com/questions/1406037/custom-animation-for-pushing-a-uiviewcontroller

superview nil self.view addSubview coming.view coming.view.frame CGRectMake 160 160 0 0 UIView beginAnimations @ frame context nil UIView setAnimationDuration 4 UIView setAnimationCurve UIViewAnimationCurveEaseInOut..

How can I customize an iOS alert view?

http://stackoverflow.com/questions/2600779/how-can-i-customize-an-ios-alert-view

CGAffineTransformScale CGAffineTransformIdentity 0.001 0.001 self.view.alpha 1.0 UIView beginAnimations nil context nil UIView setAnimationDuration kTransitionDuration 1.5 UIView setAnimationDelegate self.. CGAffineTransformIdentity 1.1 1.1 UIView commitAnimations void bounce1AnimationStopped UIView beginAnimations nil context nil UIView setAnimationDuration kTransitionDuration 2 UIView setAnimationDelegate self UIView.. CGAffineTransformIdentity 0.9 0.9 UIView commitAnimations void bounce2AnimationStopped UIView beginAnimations nil context nil UIView setAnimationDuration kTransitionDuration 2 self.view.transform CGAffineTransformIdentity..

How to hide uitabbarcontroller

http://stackoverflow.com/questions/5272290/how-to-hide-uitabbarcontroller

Method implementations void hideTabBar UITabBarController tabbarcontroller UIView beginAnimations nil context NULL UIView setAnimationDuration 0.5 for UIView view in tabbarcontroller.view.subviews .. 480 UIView commitAnimations void showTabBar UITabBarController tabbarcontroller UIView beginAnimations nil context NULL UIView setAnimationDuration 0.5 for UIView view in tabbarcontroller.view.subviews ..

Can I use CGAffineTransformMakeRotation to rotate a view more than 360 degrees?

http://stackoverflow.com/questions/542739/can-i-use-cgaffinetransformmakerotation-to-rotate-a-view-more-than-360-degrees

an image which I'ld like to have swirl outwards. Currently my code looks like this wrapped in a beginAnimations commitAnimations block scale CGAffineTransformScale CGAffineTransformIdentity 5.0f 5.0f swirl CGAffineTransformRotate..

Cancel a UIView animation?

http://stackoverflow.com/questions/554997/cancel-a-uiview-animation

the CA level i.e. I've done something like this maybe setting an end animation action too UIView beginAnimations nil context NULL UIView setAnimationDuration duration UIView setAnimationCurve UIViewAnimationCurveLinear.. state. When you set it to YES the current animation is cut short. Looks something like this UIView beginAnimations nil context NULL UIView setAnimationBeginsFromCurrentState YES UIView setAnimationDuration 0.1 UIView..

how to display test IAd banner in the simulator

http://stackoverflow.com/questions/5947552/how-to-display-test-iad-banner-in-the-simulator

addSubview bannerView void bannerViewDidLoadAd ADBannerView banner if self.isBannerVisible UIView beginAnimations @ animateAdBannerOn context NULL Assumes the banner view is just off the bottom of the screen. bannerView.frame.. NSError error NSLog @ the failed error is @ error if self.isBannerVisible UIView beginAnimations @ animateAdBannerOff context NULL Assumes the banner view is placed at the bottom of the screen. bannerView.frame..

Locking the Fields in MFMailComposeViewController

http://stackoverflow.com/questions/6284599/locking-the-fields-in-mfmailcomposeviewcontroller

addSubview bgimage bgimage.alpha 0 bgimage addSubview loadingLabel loadingLabel.alpha 0 UIView beginAnimations @ Fade In context nil UIView setAnimationDelay 0 UIView setAnimationDuration .5 bgimage.alpha 1 loadingLabel.alpha.. self startSpinner bgimage release void removeWaitOverlay fade the overlay out UIView beginAnimations @ Fade Out context nil UIView setAnimationDelay 0 UIView setAnimationDuration .5 bgimage.alpha 0 loadingLabel.alpha..

iPhone UIView Animation Best Practice

http://stackoverflow.com/questions/630265/iphone-uiview-animation-best-practice

but there are also code snippets floating around the net that look like this UIView beginAnimations nil context nil UIView setAnimationDuration 0.75 UIView setAnimationDelegate self UIView setAnimationTransition.. core animation share improve this question From the UIView reference 's section about the beginAnimations context method Use of this method is discouraged in iPhone OS 4.0 and later. You should use the block..

View Controllers: How to switch between views programmatically?

http://stackoverflow.com/questions/910994/view-controllers-how-to-switch-between-views-programmatically

viewDidDisappear YES blueViewController viewDidAppear YES 3. now add animation UIView beginAnimations @ View Flip context nil UIView setAnimationDuration 1.25 UIView setAnimationCurve UIViewAnimationCurveEaseInOut..

how to create iphone's wobbling icon effect?

http://stackoverflow.com/questions/929364/how-to-create-iphones-wobbling-icon-effect

CGAffineTransformIdentity RADIANS 5.0 itemView.transform leftWobble starting point UIView beginAnimations @ wobble context itemView UIView setAnimationRepeatAutoreverses YES important UIView setAnimationRepeatCount.. to add code to put the item back in its original state when done. Also note that you can use the beginAnimations context value to pass along anything to the start stop methods. In this case it's the wobbling object..

How to make a UITextField move up when keyboard is present

http://stackoverflow.com/questions/1126726/how-to-make-a-uitextfield-move-up-when-keyboard-is-present

0 self setViewMovedUp YES method to move the view up down whenever the keyboard is shown dismissed void setViewMovedUp BOOL movedUp UIView beginAnimations nil context NULL UIView setAnimationDuration 0.3 if you want to slide up the view CGRect rect self.view.frame if movedUp 1. move the view's origin up so that the..

iPhone Keyboard Covers UITextField

http://stackoverflow.com/questions/1247113/iphone-keyboard-covers-uitextfield

up const int movementDistance 80 tweak as needed const float movementDuration 0.3f tweak as needed int movement up movementDistance movementDistance UIView beginAnimations @ anim context nil UIView setAnimationBeginsFromCurrentState YES UIView setAnimationDuration movementDuration self.view.frame CGRectOffset self.view.frame 0 movement..

Custom animation for pushing a UIViewController

http://stackoverflow.com/questions/1406037/custom-animation-for-pushing-a-uiviewcontroller

the expand animation with the following code if coming.view superview nil self.view addSubview coming.view coming.view.frame CGRectMake 160 160 0 0 UIView beginAnimations @ frame context nil UIView setAnimationDuration 4 UIView setAnimationCurve UIViewAnimationCurveEaseInOut coming viewWillAppear YES going viewWillAppear YES coming.view.frame..

How can I customize an iOS alert view?

http://stackoverflow.com/questions/2600779/how-can-i-customize-an-ios-alert-view

Something like this works void initialDelayEnded self.view.transform CGAffineTransformScale CGAffineTransformIdentity 0.001 0.001 self.view.alpha 1.0 UIView beginAnimations nil context nil UIView setAnimationDuration kTransitionDuration 1.5 UIView setAnimationDelegate self UIView setAnimationDidStopSelector @selector bounce1AnimationStopped.. self.view.transform CGAffineTransformScale CGAffineTransformIdentity 1.1 1.1 UIView commitAnimations void bounce1AnimationStopped UIView beginAnimations nil context nil UIView setAnimationDuration kTransitionDuration 2 UIView setAnimationDelegate self UIView setAnimationDidStopSelector @selector bounce2AnimationStopped.. self.view.transform CGAffineTransformScale CGAffineTransformIdentity 0.9 0.9 UIView commitAnimations void bounce2AnimationStopped UIView beginAnimations nil context nil UIView setAnimationDuration kTransitionDuration 2 self.view.transform CGAffineTransformIdentity UIView commitAnimations I have the possibility of..

How to hide uitabbarcontroller

http://stackoverflow.com/questions/5272290/how-to-hide-uitabbarcontroller

to these functions.. Method call self hideTabBar self.tabBarController Method implementations void hideTabBar UITabBarController tabbarcontroller UIView beginAnimations nil context NULL UIView setAnimationDuration 0.5 for UIView view in tabbarcontroller.view.subviews if view isKindOfClass UITabBar class view setFrame CGRectMake.. view.frame.origin.x view.frame.origin.y view.frame.size.width 480 UIView commitAnimations void showTabBar UITabBarController tabbarcontroller UIView beginAnimations nil context NULL UIView setAnimationDuration 0.5 for UIView view in tabbarcontroller.view.subviews NSLog @ @ view if view isKindOfClass UITabBar class view setFrame..

Can I use CGAffineTransformMakeRotation to rotate a view more than 360 degrees?

http://stackoverflow.com/questions/542739/can-i-use-cgaffinetransformmakerotation-to-rotate-a-view-more-than-360-degrees

more than 360 degrees I'm writing an iPhone app and I've got an image which I'ld like to have swirl outwards. Currently my code looks like this wrapped in a beginAnimations commitAnimations block scale CGAffineTransformScale CGAffineTransformIdentity 5.0f 5.0f swirl CGAffineTransformRotate scale M_PI player setTransform swirl player..

Cancel a UIView animation?

http://stackoverflow.com/questions/554997/cancel-a-uiview-animation

animation while it is in progress Or would I have to drop to the CA level i.e. I've done something like this maybe setting an end animation action too UIView beginAnimations nil context NULL UIView setAnimationDuration duration UIView setAnimationCurve UIViewAnimationCurveLinear other animation properties set view properties UIView.. method to start from the current state. When you set it to YES the current animation is cut short. Looks something like this UIView beginAnimations nil context NULL UIView setAnimationBeginsFromCurrentState YES UIView setAnimationDuration 0.1 UIView setAnimationCurve UIViewAnimationCurveLinear other animation..

how to display test IAd banner in the simulator

http://stackoverflow.com/questions/5947552/how-to-display-test-iad-banner-in-the-simulator

bannerView.delegate self self.view addSubview bannerView void bannerViewDidLoadAd ADBannerView banner if self.isBannerVisible UIView beginAnimations @ animateAdBannerOn context NULL Assumes the banner view is just off the bottom of the screen. bannerView.frame CGRectOffset bannerView.frame 0 bannerView.frame.size.height.. YES void bannerView ADBannerView banner didFailToReceiveAdWithError NSError error NSLog @ the failed error is @ error if self.isBannerVisible UIView beginAnimations @ animateAdBannerOff context NULL Assumes the banner view is placed at the bottom of the screen. bannerView.frame CGRectOffset bannerView.frame 0 bannerView.frame.size.height..

Locking the Fields in MFMailComposeViewController

http://stackoverflow.com/questions/6284599/locking-the-fields-in-mfmailcomposeviewcontroller

bgimage.image UIImage imageNamed @ waitOverLay.png self.view addSubview bgimage bgimage.alpha 0 bgimage addSubview loadingLabel loadingLabel.alpha 0 UIView beginAnimations @ Fade In context nil UIView setAnimationDelay 0 UIView setAnimationDuration .5 bgimage.alpha 1 loadingLabel.alpha 1 UIView commitAnimations self startSpinner bgimage.. .5 bgimage.alpha 1 loadingLabel.alpha 1 UIView commitAnimations self startSpinner bgimage release void removeWaitOverlay fade the overlay out UIView beginAnimations @ Fade Out context nil UIView setAnimationDelay 0 UIView setAnimationDuration .5 bgimage.alpha 0 loadingLabel.alpha 0 UIView commitAnimations self stopSpinner void..

iPhone UIView Animation Best Practice

http://stackoverflow.com/questions/630265/iphone-uiview-animation-best-practice

myview layer addAnimation applicationLoadViewIn forKey kCATransitionReveal but there are also code snippets floating around the net that look like this UIView beginAnimations nil context nil UIView setAnimationDuration 0.75 UIView setAnimationDelegate self UIView setAnimationTransition UIViewAnimationTransitionFlipFromRight forView myview.. approach to work correctly. iphone ios cocoa touch uiview core animation share improve this question From the UIView reference 's section about the beginAnimations context method Use of this method is discouraged in iPhone OS 4.0 and later. You should use the block based animation methods instead. Eg of Block based Animation..

View Controllers: How to switch between views programmatically?

http://stackoverflow.com/questions/910994/view-controllers-how-to-switch-between-views-programmatically

self.blueViewController.view atIndex 0 yellowViewController viewDidDisappear YES blueViewController viewDidAppear YES 3. now add animation UIView beginAnimations @ View Flip context nil UIView setAnimationDuration 1.25 UIView setAnimationCurve UIViewAnimationCurveEaseInOut blue view will appear by flipping from right if..

how to create iphone's wobbling icon effect?

http://stackoverflow.com/questions/929364/how-to-create-iphones-wobbling-icon-effect

RADIANS 5.0 CGAffineTransform rightWobble CGAffineTransformRotate CGAffineTransformIdentity RADIANS 5.0 itemView.transform leftWobble starting point UIView beginAnimations @ wobble context itemView UIView setAnimationRepeatAutoreverses YES important UIView setAnimationRepeatCount 10 UIView setAnimationDuration 0.25 UIView setAnimationDelegate.. but this should get you started. EDIT I edited the response to add code to put the item back in its original state when done. Also note that you can use the beginAnimations context value to pass along anything to the start stop methods. In this case it's the wobbling object itself so you don't have to rely on specific ivars and the..

How to make a UITextField move up when keyboard is present

http://stackoverflow.com/questions/1126726/how-to-make-a-uitextfield-move-up-when-keyboard-is-present

YES method to move the view up down whenever the keyboard is shown dismissed void setViewMovedUp BOOL movedUp UIView beginAnimations nil context NULL UIView setAnimationDuration 0.3 if you want to slide up the view CGRect rect self.view.frame if movedUp..

iPhone Keyboard Covers UITextField

http://stackoverflow.com/questions/1247113/iphone-keyboard-covers-uitextfield

as needed const float movementDuration 0.3f tweak as needed int movement up movementDistance movementDistance UIView beginAnimations @ anim context nil UIView setAnimationBeginsFromCurrentState YES UIView setAnimationDuration movementDuration self.view.frame..

Custom animation for pushing a UIViewController

http://stackoverflow.com/questions/1406037/custom-animation-for-pushing-a-uiviewcontroller

code if coming.view superview nil self.view addSubview coming.view coming.view.frame CGRectMake 160 160 0 0 UIView beginAnimations @ frame context nil UIView setAnimationDuration 4 UIView setAnimationCurve UIViewAnimationCurveEaseInOut coming viewWillAppear..

How can I customize an iOS alert view?

http://stackoverflow.com/questions/2600779/how-can-i-customize-an-ios-alert-view

self.view.transform CGAffineTransformScale CGAffineTransformIdentity 0.001 0.001 self.view.alpha 1.0 UIView beginAnimations nil context nil UIView setAnimationDuration kTransitionDuration 1.5 UIView setAnimationDelegate self UIView setAnimationDidStopSelector.. CGAffineTransformScale CGAffineTransformIdentity 1.1 1.1 UIView commitAnimations void bounce1AnimationStopped UIView beginAnimations nil context nil UIView setAnimationDuration kTransitionDuration 2 UIView setAnimationDelegate self UIView setAnimationDidStopSelector.. CGAffineTransformScale CGAffineTransformIdentity 0.9 0.9 UIView commitAnimations void bounce2AnimationStopped UIView beginAnimations nil context nil UIView setAnimationDuration kTransitionDuration 2 self.view.transform CGAffineTransformIdentity UIView commitAnimations..

How to hide uitabbarcontroller

http://stackoverflow.com/questions/5272290/how-to-hide-uitabbarcontroller

hideTabBar self.tabBarController Method implementations void hideTabBar UITabBarController tabbarcontroller UIView beginAnimations nil context NULL UIView setAnimationDuration 0.5 for UIView view in tabbarcontroller.view.subviews if view isKindOfClass.. view.frame.size.width 480 UIView commitAnimations void showTabBar UITabBarController tabbarcontroller UIView beginAnimations nil context NULL UIView setAnimationDuration 0.5 for UIView view in tabbarcontroller.view.subviews NSLog @ @ view if view..

Can I use CGAffineTransformMakeRotation to rotate a view more than 360 degrees?

http://stackoverflow.com/questions/542739/can-i-use-cgaffinetransformmakerotation-to-rotate-a-view-more-than-360-degrees

app and I've got an image which I'ld like to have swirl outwards. Currently my code looks like this wrapped in a beginAnimations commitAnimations block scale CGAffineTransformScale CGAffineTransformIdentity 5.0f 5.0f swirl CGAffineTransformRotate scale..

Cancel a UIView animation?

http://stackoverflow.com/questions/554997/cancel-a-uiview-animation

I have to drop to the CA level i.e. I've done something like this maybe setting an end animation action too UIView beginAnimations nil context NULL UIView setAnimationDuration duration UIView setAnimationCurve UIViewAnimationCurveLinear other animation.. from the current state. When you set it to YES the current animation is cut short. Looks something like this UIView beginAnimations nil context NULL UIView setAnimationBeginsFromCurrentState YES UIView setAnimationDuration 0.1 UIView setAnimationCurve..

how to display test IAd banner in the simulator

http://stackoverflow.com/questions/5947552/how-to-display-test-iad-banner-in-the-simulator

self self.view addSubview bannerView void bannerViewDidLoadAd ADBannerView banner if self.isBannerVisible UIView beginAnimations @ animateAdBannerOn context NULL Assumes the banner view is just off the bottom of the screen. bannerView.frame CGRectOffset.. banner didFailToReceiveAdWithError NSError error NSLog @ the failed error is @ error if self.isBannerVisible UIView beginAnimations @ animateAdBannerOff context NULL Assumes the banner view is placed at the bottom of the screen. bannerView.frame CGRectOffset..

Locking the Fields in MFMailComposeViewController

http://stackoverflow.com/questions/6284599/locking-the-fields-in-mfmailcomposeviewcontroller

self.view addSubview bgimage bgimage.alpha 0 bgimage addSubview loadingLabel loadingLabel.alpha 0 UIView beginAnimations @ Fade In context nil UIView setAnimationDelay 0 UIView setAnimationDuration .5 bgimage.alpha 1 loadingLabel.alpha 1 UIView.. 1 UIView commitAnimations self startSpinner bgimage release void removeWaitOverlay fade the overlay out UIView beginAnimations @ Fade Out context nil UIView setAnimationDelay 0 UIView setAnimationDuration .5 bgimage.alpha 0 loadingLabel.alpha 0 UIView..

iPhone UIView Animation Best Practice

http://stackoverflow.com/questions/630265/iphone-uiview-animation-best-practice

forKey kCATransitionReveal but there are also code snippets floating around the net that look like this UIView beginAnimations nil context nil UIView setAnimationDuration 0.75 UIView setAnimationDelegate self UIView setAnimationTransition UIViewAnimationTransitionFlipFromRight.. ios cocoa touch uiview core animation share improve this question From the UIView reference 's section about the beginAnimations context method Use of this method is discouraged in iPhone OS 4.0 and later. You should use the block based animation methods..

View Controllers: How to switch between views programmatically?

http://stackoverflow.com/questions/910994/view-controllers-how-to-switch-between-views-programmatically

atIndex 0 yellowViewController viewDidDisappear YES blueViewController viewDidAppear YES 3. now add animation UIView beginAnimations @ View Flip context nil UIView setAnimationDuration 1.25 UIView setAnimationCurve UIViewAnimationCurveEaseInOut blue view..

how to create iphone's wobbling icon effect?

http://stackoverflow.com/questions/929364/how-to-create-iphones-wobbling-icon-effect

CGAffineTransformRotate CGAffineTransformIdentity RADIANS 5.0 itemView.transform leftWobble starting point UIView beginAnimations @ wobble context itemView UIView setAnimationRepeatAutoreverses YES important UIView setAnimationRepeatCount 10 UIView setAnimationDuration.. I edited the response to add code to put the item back in its original state when done. Also note that you can use the beginAnimations context value to pass along anything to the start stop methods. In this case it's the wobbling object itself so you don't..