I have a UIView called qShake. When the user makes an error, I want that view to shake from left to right in a small space for a short period of time. How would I create an animation to do that?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
You can use a CABasicAnimation, and set the repeat count to some small value, while animating the position of the view.layer that you want to vibrate. Note that
clipsToBounds
for the view must be set to NO. Also be sure to include the QuartzCore framework in the project.