摘要: 注:在测定位功能的时候,比较多人会奇怪,为什么代码已经写好了,可是测试的时候,只有首次启动模拟器定位代码才有效。那是因为模拟器除了首次启动的时候会有默认的定位位置(默认位置是苹果美国总部),其它时候都需要你手动的去开启,在调试->位置->自定位置(填写经纬度)。.h1 #import 2 3 // ... 阅读全文
posted @ 2015-01-18 23:40 纠纠结结 阅读(1810) 评论(0) 推荐(0) 编辑
摘要: html:其实就是根据table标签把几个实心圆div进行等边六角形的排布,并放入一个div容器中,然后利用CSS3的循环旋转的动画效果对最外层的div容器进行自转实现,当然不要忘了把div容器的外边框设置圆形弧度的。 1 2 3 4 ... 阅读全文
posted @ 2014-11-04 11:17 纠纠结结 阅读(2885) 评论(0) 推荐(0) 编辑
摘要: html: {{countdown}}JS:$scope.countdown = 10;var myTime = setInterval(function() { $scope.$apply(function()... 阅读全文
posted @ 2014-11-04 10:30 纠纠结结 阅读(865) 评论(0) 推荐(0) 编辑
摘要: 在pushViewController之前调用:1 self.hidesBottomBarWhenPushed = YES;2 ZWMessageViewController *messageController = [[ZWMessageViewController alloc] initWith... 阅读全文
posted @ 2014-10-19 16:07 纠纠结结 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 1 - (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)newsize 2 { 3 // 创建一个bitmap的context 4 5 // 并把它设置成为当前正在使用的context 6 7... 阅读全文
posted @ 2014-10-19 16:04 纠纠结结 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 1 + (id)sharedWhatever2 {3 static dispatch_once_t pred;4 static Whatever *whatever = nil;5 dispatch_once(&pred, ^{6 whatever = [[s... 阅读全文
posted @ 2014-10-19 16:03 纠纠结结 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 1.注册NSNotificationCenter,并设置关联1 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getArray:) name:@"getArray" object:nil];2 3 ... 阅读全文
posted @ 2014-10-19 16:01 纠纠结结 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 1 // 设置导航栏半透明背景2 UINavigationBar *navBar = self.navigationBar;3 if ([navBar respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)]) {4 [... 阅读全文
posted @ 2014-10-19 15:57 纠纠结结 阅读(471) 评论(0) 推荐(0) 编辑
摘要: 方法一(推荐):使用CALayerCALayer *middleBorder = [CALayer layer];middleBorder.frame = CGRectMake(x, y, width, height);middleBorder.backgroundColor = UIColor.C... 阅读全文
posted @ 2014-10-19 15:56 纠纠结结 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 一、UIView自带有的触摸事件- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; if (touch.tapCount == 2)... 阅读全文
posted @ 2014-10-19 15:44 纠纠结结 阅读(157) 评论(0) 推荐(0) 编辑