草庐IT

can-animate

全部标签

ios - iPhone : Can I programmatically disable auto turning off the display?

这个问题在这里已经有了答案:HowdoIpreventtheiPhonescreenfromdimmingorturningoffwhilemyapplicationisrunning?(5个答案)HowdoIkeeptheuser'siPhone'sdisplayon?(2个答案)Howtodisable/enablethesleepmodeprogrammaticallyiniOS?(4个答案)关闭9年前。我最近开始使用Objective-C开发iPhone应用程序,并组装了一个小型通用视频播放器,可以让我在iPhone上观看电视节目、电影等。除了一件小事外,一切都完美无缺。如果我

iphone - 使用 scrollToRowAtIndexPath 滚动到最后一个 UITableViewCell :atScrollPosition:animated using NSFetchedResultsControllerDelegate methods

我正在向UITableView的底部添加一个新项目,在插入该项目后,我希望UITableView滚动到最底部以显示新插入的项目。新项目保存到CoreData,UITableView使用NSFetchedResultsController自动更新。-(void)controller:(NSFetchedResultsController*)controllerdidChangeObject:(id)anObjectatIndexPath:(NSIndexPath*)indexPathforChangeType:(NSFetchedResultsChangeType)typenewInde

ios - 使用 Core Animation 改变 cornerRadius

我正在尝试通过以下方式更改按钮(OpenNoteVisible.layer)的角半径:CABasicAnimation*animation=[CABasicAnimationanimationWithKeyPath:@"cornerRadius"];animation.timingFunction=[CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionLinear];animation.fromValue=[NSNumbernumberWithFloat:10.0f];animation.toValue=[NSNumb

ios - Xcode 编译错误 : Lipo: can't open input file

/fatalerror:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo:无法打开输入文件:/Users/zicjin/Library/Developer/Xcode/DerivedData/Baozou-iOS-gsgjiwiqjwffeheenpeffrqpytqx/Build/Intermediates/Baozou-iOS.build/Debug-iphoneos/Baozou-iOS.build/Objects-normal/armv7/Bao

iOS : How can I set frame of UILabel according to its text?

我想开发一个功能,根据文本设置UILabel的框架意味着当文本改变时它的框架改变了吗?如果是,请分享任何链接或任何想法来开发它。提前致谢。 最佳答案 label.text=@"sometextofrandomlength";[labelsizeToFit];如果文本可能超过1行,请在调用sizeToFit之前添加label.numberOfLines=0;; 关于iOS:HowcanIsetframeofUILabelaccordingtoitstext?,我们在StackOverflo

ios - presentViewController :animated:completion: broken in iOS 6. x的ARC内存管理?

我的ViewController通过presentViewController:animated:completion:方法呈现一个View。View显示良好。然后我关闭这个View并重新呈现它并得到以下崩溃:***-[WebBrowserisKindOfClass:]:messagesenttodeallocatedinstance0x1f640ac0我的代码使用的是ARC。这是我的WebBrowser类的代码,这是一个简单的嵌入式浏览器。浏览器.h:@interfaceWebBrowser:ITViewController@property(nonatomic,strong)NSS

ios - 自定义标记性能 iOS,崩溃,结果为 "((null)) was false: Reached the max number of texture atlases, can not allocate more."

我在我的应用程序中集成了Googlemap,并且还使用了GooglePlacesAPI。在我从GooglePlacesAPI(大约60个)获得所有结果后,我在自定义标记的帮助下显示它们。我正在制作的自定义标记包括“地点图像”和“地点名称”,因此我必须先在UIView中绘制它,然后借助以下函数将其呈现为UIImage-(UIImage*)imageFromView:(UIView*)view{if([[UIScreenmainScreen]respondsToSelector:@selector(scale)]){UIGraphicsBeginImageContextWithOption

ios - #pragma objective-c : can you have more than just 'mark' ?

我熟悉#pragmamarkobjective-c/xcode/ios开发,它对于查找代码段很有用。但是,我想知道除了'mark'之外是否还有其他关键字。比如,你能做#pragmasomethingelse吗?提前致谢! 最佳答案 首先,举几个例子:您可以控制诊断:http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas来自同一个链接:clangsupportstheMicrosoft"#pragmapack"featureforc

ios - 自动布局 : animating changes to NSLayoutConstraint's multiplier

我有这个简单的观点:-(void)viewDidLoad{[superviewDidLoad];redBox=[[UIViewalloc]init];[redBoxsetBackgroundColor:[UIColorredColor]];[redBoxsetTranslatesAutoresizingMaskIntoConstraints:NO];[self.viewaddSubview:redBox];//H:widthConstraint=[NSLayoutConstraintconstraintWithItem:redBoxattribute:NSLayoutAttribute

iPhone : Best way to detect the end of UIImageView image sequence animation

我们知道UIImageView对图像序列动画有很好的支持。我们可以轻松地创建一个UIImage对象数组,设置animationImages属性,配置动画持续时间,重复次数等,然后就可以触发了。但是似乎没有办法知道这个动画什么时候结束。假设我有十张图片,然后我想用它们运行一个动画(重复计数=1)。当动画结束时,我想运行一些其他代码。知道动画已经结束的最佳方式是什么?我已经知道我可以创建一个NSTimer并安排它在动画持续时间后触发。但是如果你需要很好的精度,你真的不能依赖计时器。所以我的问题是,有没有更好的方法可以在不使用计时器的情况下知道UIImageView图像序列动画已经结束?代码