- 浏览: 74303 次
- 性别:
- 来自: 成都
-
文章列表
#include <math.h> #define pi 3.14159265358979323846 #define degreesToRadian(x) (pi * x / 180.0) #define radiansToDegrees(x) (180.0 * x / pi) CGFloat distanceBetweenPoints (CGPoint first, CGPoint second) { CGFloat deltaX = second.x - first.x; CGFloat deltaY = second.y - first.y; re ...
在 NSDate中获得时间信息,年、月、星期、日、时、分和秒:
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDate *now;
NSDateComponents *comps = [[NSDateComponents alloc] init];
NSInteger unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSWee ...
Cocos2D:滚动滚屏黑边问题
- 博客分类:
- iOS:Develop
为Sprite添加下面的方法:
[[sprite
texture
]
setAliasTexParameters
];
大致思路使用两层辅助UIView的旋转来实现添加后的View的横向翻页效果
CATransform3D transformA = CATransform3DRotate(CATransform3DIdentity, degreesToRadian(90), 0, 0, 1.0f); CATransform3D transformB = CATransform3DRotate(CATransform3DIdentity, degreesToRadian(180), 0.0f, 1.0f, 0.0f); bgview.layer.transform = CATransf ...
先说使用,再给定义
使用方法:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"ImageCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; i ...
Log:
Couldn't register com.${appname}.xxx with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.
解决方法
:
重启设备