ios开发问题小结
2013-12-19 00:31
197 查看
呃,代码没带回来,想总结的细节点,有很多竟然一时无法完整想起。因此
现在就想到几点写几点吧。拿到代码后,在持续补充。
1>UIView(UIImageView) 围绕中心旋转
[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimaionDuration:.1f]; //设置动画时长
photoImg.layer.anchorPoint = CGPointMake(0.5,0.5); //围绕中心旋转
photoImg.transform = CGAffineTransformMakeRotation(M_PI);
[UIView comitAnimations];
2>ios7下,视图布满全屏
{
if( [[UIDevice currentDevice] systemVersion] floatValue] >= 7.0 )
{
CGRect frame = self.navigationController.view.frame;
self.automaticallyAdjustScrollViewInsets = NO;
[self setNeedsStatusBarAppearanceUpdate];
}
}
3>ios状态栏白色字体
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[self setNeedsStatusBarAppearanceUpdate];
4>UITableView消除Section的粘滞性(viewForHeadSection随表单滚动)
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
CGFloat sectionHeaderHeight = 60;
if (scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) {
scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0);
} else if (scrollView.contentOffset.y>=sectionHeaderHeight) {
scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0);
}
}
现在就想到几点写几点吧。拿到代码后,在持续补充。
1>UIView(UIImageView) 围绕中心旋转
[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimaionDuration:.1f]; //设置动画时长
photoImg.layer.anchorPoint = CGPointMake(0.5,0.5); //围绕中心旋转
photoImg.transform = CGAffineTransformMakeRotation(M_PI);
[UIView comitAnimations];
2>ios7下,视图布满全屏
{
if( [[UIDevice currentDevice] systemVersion] floatValue] >= 7.0 )
{
CGRect frame = self.navigationController.view.frame;
self.automaticallyAdjustScrollViewInsets = NO;
[self setNeedsStatusBarAppearanceUpdate];
}
}
3>ios状态栏白色字体
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[self setNeedsStatusBarAppearanceUpdate];
4>UITableView消除Section的粘滞性(viewForHeadSection随表单滚动)
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
CGFloat sectionHeaderHeight = 60;
if (scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) {
scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0);
} else if (scrollView.contentOffset.y>=sectionHeaderHeight) {
scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0);
}
}
相关文章推荐
- iOS 开发问题小结one
- 【iOS-Cocos2d游戏开发之十二】浅析使用C++/C/OC进行iOS游戏混编出现“failed with exit”问题与小结;
- AIR for IOS开发问题小结
- IOS开发编程中的问题小结(二)
- iOS 开发问题小结two
- 【iOS-Cocos2d游戏开发之十二】浅析使用C++/C/OC进行iOS游戏混编出现“failed with exit”问题与小结;
- 【Cocos2d游戏开发之十二】浅析使用C++/C/OC进行iOS游戏混编出现“failed with exit”问题与小结;
- 【Cocos2d游戏开发之十二】浅析使用C++/C/OC进行iOS游戏混编出现“failed with exit”问题与小结;
- 【iOS-Cocos2d游戏开发之十二】浅析使用C++/C/OC进行iOS游戏混编出现“failed with exit”问题与小结;
- 【iOS-Cocos2d游戏开发之十二】浅析使用C++/C/OC进行iOS游戏混编出现“failed with exit”问题与小结;
- iOS开发问题小结
- AIR for IOS开发问题小结
- IOS开发 Xcode7.3不能提示自定义类名问题解决办法
- Android开发常见问题及解决方法小结
- IOS开发:NSDateFormatter的问题
- iOS开发中涉及的字体问题
- 前端开发中常遇到的浏览器兼容问题小结
- iOS下的智能硬件开发遇到的问题总结
- iOS 协同开发 问题
- IOS开发:xcode5版本引发的问题