我刚刚将我的Xcode更新为4.0.1.现在我对从我的测试仪甚至是我的手机收到的崩溃日志的符号表有疑问.
当我构建AdHoc发行版时,我正在使用"Arhive"方案,然后我创建了*.ipa文件,用我的开发人员凭据唱出来.
这是问题吗?我找不到这些AdHoc版本的dSym文件.
我正在开发一款益智游戏,我需要90在每次双击时将拼图旋转到角度.
我尝试用两种不同的方式做到了.第一种方法是这样的:
[UIView beginAnimations:@"rotate" context:nil];
[UIView setAnimationDuration:0.5];
self.transform = CGAffineTransformMakeRotation(90);
[UIView commitAnimations];
Run Code Online (Sandbox Code Playgroud)
唯一的问题是这件作品不是旋转90度数; 它绕着大约旋转100,这个动画正在修改拼图的框架UIView.
这是我的控制台输出:
frame BEFORE ROTATION: {{35, 178}, {80, 80}}
frame AFTER ROTATION: {{21.3172, 164.317}, {107.366, 107.366}}
Run Code Online (Sandbox Code Playgroud)
我尝试的第二种方法就是这样:
CABasicAnimation* spinAnimation = [CABasicAnimation
animationWithKeyPath:@"transform.rotation"];
spinAnimation.toValue = [NSNumber numberWithFloat:1];
[self.layer addAnimation:spinAnimation forKey:@"spinAnimation"];
Run Code Online (Sandbox Code Playgroud)
这种方法的问题在于,在完成旋转之后,它将我的UIView状态转换为之前的状态.
如何在没有这些问题的情况下用动画旋转拼图?
在我的应用程序中,我需要调整大小并裁剪一些本地和在线存储的图像.我正在使用Trevor Harmon的教程实现UIImage+Resize.
在我的iPhone 4(iOS 4.3.1)上一切正常,我没有问题.但是在我的iPhone 3G(iOS 3.2)上,调整大小和裁剪方法对任何图片都不起作用(本地存储的是PNG).这是控制台输出:
Tue Apr 5 02:34:44 Andreis-MacBook-Pro.local Puzzle[12453] <Error>: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 288 bytes/row.
Tue Apr 5 02:34:44 Andreis-MacBook-Pro.local Puzzle[12453] <Error>: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 288 bytes/row.
Tue Apr 5 02:34:44 Andreis-MacBook-Pro.local Puzzle[12453] <Error>: CGBitmapContextCreate: unsupported parameter combination: 8 integer bits/component; 32 bits/pixel; 3-component color space; kCGImageAlphaLast; 288 bytes/row.
Tue Apr 5 …Run Code Online (Sandbox Code Playgroud) 我正在为iPhone设计一个pixelate应用程序.因为使用iPhone 4相机拍摄的照片太大,因此在更新像素化图片时应用程序工作非常慢,我试图先创建图片的图块,然后更新图块而不是孔图片.
在构建图块时,它适用于以横向模式(2592 x 1936 pxl)和低分辨率图片拍摄的相机胶卷照片,但不适用于以纵向模式拍摄的照片(1936 x 2592 pxl).
从原始图像切割切片的代码如下所示:
for (i = 0; i < NrOfTilesPerHeight; i++) {
for (j = 0; j < NrOfTilesPerWidth; j++) {
CGRect imageRect = CGRectMake(j*TILE_WIDTH, i*TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT);
CGImageRef image = CGImageCreateWithImageInRect(aux.CGImage, imageRect);
UIImage *img = [UIImage imageWithCGImage:image];
UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
}
}
Run Code Online (Sandbox Code Playgroud)
问题是用这些瓷砖创建的图像逆时针旋转到90度角.
非常感谢,Andrei
我试图从一些图片创建一部电影.它适用于高清图片({720,1280})或更低的分辨率.但是当我尝试使用全高清图片{1080,1920}创建电影时,视频会被加扰.这是一个链接,可以看到它的外观http://www.youtube.com/watch?v=BfYldb8e_18.你有什么想法我可能做错了吗?
- (void) createMovieWithOptions:(NSDictionary *) options
{
@autoreleasepool {
NSString *path = [options valueForKey:@"path"];
CGSize size = [(NSValue *)[options valueForKey:@"size"] CGSizeValue];
NSArray *imageArray = [options valueForKey:@"pictures"];
NSInteger recordingFPS = [[options valueForKey:@"fps"] integerValue];
BOOL success=YES;
NSError *error = nil;
AVAssetWriter *assetWriter = [[AVAssetWriter alloc] initWithURL:[NSURL fileURLWithPath:path]
fileType:AVFileTypeQuickTimeMovie
error:&error];
NSParameterAssert(assetWriter);
NSDictionary *videoSettings = [NSDictionary dictionaryWithObjectsAndKeys:
AVVideoCodecH264, AVVideoCodecKey,
[NSNumber numberWithFloat:size.width], AVVideoWidthKey,
[NSNumber numberWithFloat:size.height], AVVideoHeightKey,
nil];
AVAssetWriterInput *videoWriterInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo
outputSettings:videoSettings];
// Configure settings for the pixel buffer adaptor.
NSDictionary* bufferAttributes …Run Code Online (Sandbox Code Playgroud) 您是否知道是否有适用于iPhone的官方DeviantArt API或SDK?
我正在构建一个应用程序,我想整合搜索Deviant Art公共提要.这可能吗?
如何在xCode 4中监控iPhone上使用的内存?
我需要像以前版本的xCode上的Activity Monitor这样的工具.还是其他任何分析工具?