小编fla*_*ghi的帖子

此类不是键值givenName的键值编码兼容

我有这个

- (void)loadView {
BOOL success;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString* documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString* databasePath = [documentsPath stringByAppendingPathComponent:@"ProxDeals.db"];
NSError *error;

BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:databasePath];
if (fileExists==TRUE) {
    [[NSBundle mainBundle] loadNibNamed:@"ProxDealsViewController" owner:self options:nil];
}
else {
    NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ProxDeals.db"];
    NSLog(@"%@",defaultDBPath);
    success = [fileManager copyItemAtPath:defaultDBPath toPath:databasePath error:&error];
    if (!success) {
        NSAssert1(0, @"Failed to create writable database file with message '%@/.", [error localizedDescription]);
    }
    [[NSBundle mainBundle] loadNibNamed:@"UserRegistration" owner:self options:nil];
}
Run Code Online (Sandbox Code Playgroud)

}

而这个错误: …

iphone

20
推荐指数
1
解决办法
4万
查看次数

应用程序在启动后立即崩溃

编辑:我的问题是因为plist文件已损坏.所以,如果你有同样的问题,可能是因为你的plist文件中有些东西.

所以我有这个应用程序,一切正常,直到我将我的设备更新到IOS 6.之后,我无法在设备上安装该应用程序.该应用程序在IOS 5.0模拟器和IOS 6.0模拟器上运行良好.当我尝试为设备构建它时,启动屏幕会显示两秒钟,然后应用程序关闭.在Xcode中我收到此错误:

timed out waiting for app to launch
Run Code Online (Sandbox Code Playgroud)

我搜索了网页,它说这是一个AdHoc配置问题,但我的配置文件是有序的.我甚至更改了应用程序ID并删除了旧的配置,我得到了同样的错误.

在设备控制台中,我收到这个奇怪的错误:

Oct 15 23:48:23 iPad2-3G backboardd[51] <Warning>: Launch Services: Registered unknown app identifier InvoiceAppDev
??Oct 15 23:48:23 iPad2-3G backboardd[51] <Warning>: Launch Services: Unable to find app identifier InvoiceAppDev
Oct 15 23:48:23 iPad2-3G backboardd[51] <Warning>: Can't create application "InvoiceAppDev" without a bundle path
Oct 15 23:48:44 iPad2-3G mobile_house_arrest[200] <Error>: Max open files: 78
??Oct 15 23:48:44 iPad2-3G installd[30] <Error>: 0x2ff81000 handle_install: Install of "/var/mobile/Media/PublicStaging/InvoiceApp.app" requested by mobile_installation_proxy
Oct …
Run Code Online (Sandbox Code Playgroud)

xcode ios ios6 ios-provisioning

7
推荐指数
1
解决办法
1万
查看次数

iPhone - AVAssetWriter - 从1920×1080像素的照片创建电影时出错

我试图从一些图片创建一部电影.它适用于高清图片({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 mobile ios avassetwriter avasset

7
推荐指数
1
解决办法
1883
查看次数

IOS 5上的Xcode 4.5错误

我安装了GM版本的xcode,当我尝试在IOS 5上安装我的应用程序时,我开始收到此错误.该应用程序在IOS 6上工作正常.有人可以告诉我可能是什么问题?我包含了libobjc.A.dylib库,我得到了同样的结果.

dyld:惰性符号绑定失败:未找到符号:_objc_setProperty_atomic_copy

参考自:/var/mobile/Applications/8BCAAF22-5857-427D-9FDA-48D369CF3DD8/FlipBookApp.app/FlipBookApp预期在:/usr/lib/libobjc.A.dylib

dyld:未找到符号:_objc_setProperty_atomic_copy引用自:/var/mobile/Applications/8BCAAF22-5857-427D-9FDA-48D369CF3DD8/FlipBookApp.app/FlipBookApp预期在:/usr/lib/libobjc.A.dylib

xcode ios ios6 xcode4.5

5
推荐指数
2
解决办法
5232
查看次数

UITableView字幕没有出现

我有这个简单的代码:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
        cell.accessoryType=UITableViewCellAccessoryDetailDisclosureButton;
    }

    // Configure the cell...
    NSString *subtitle = [NSString stringWithString: @"All about the color "];
    cell.detailTextLabel.text=subtitle;
    cell.textLabel.text = [authorList objectAtIndex: [indexPath row]];

    return cell;
}
Run Code Online (Sandbox Code Playgroud)

问题是我的副标题没有出现.我做错了什么.请帮忙.谢谢.

objective-c uitableview ios

4
推荐指数
1
解决办法
9870
查看次数

自定义UiSlider IOS 6

所以我有这段代码创建一个自定义UISlider.它工作正常,直到IOS 6.在IOS 6中,图像不显示,它显示默认滑块.有人可以解释为什么会这样吗?

[sliderFPS setMinimumTrackImage:[[UIImage imageNamed:@"camera_slider_empty.png"] stretchableImageWithLeftCapWidth:8 topCapHeight:0]
                       forState:UIControlStateNormal];
[sliderFPS setMaximumTrackImage:[[UIImage imageNamed:@"camera_slider_full.png"] stretchableImageWithLeftCapWidth:8 topCapHeight:0]
                       forState:UIControlStateNormal];

[sliderFPS setThumbImage:[UIImage imageNamed:@"camera_fps_slider_button"]      
                forState:UIControlStateNormal];
Run Code Online (Sandbox Code Playgroud)

iphone objective-c uislider ios ios6

4
推荐指数
1
解决办法
5833
查看次数

IOS得到了位置

我在UIScrollView中有很多按钮,我试图在按钮点击上获得他们的位置.这是我的代码:

UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(2, 0, 262, 748)];
scrollView.contentSize=CGSizeMake(262, 816);
scrollView.bounces=NO;
scrollView.delaysContentTouches=YES;

buton1 = [[UIButton buttonWithType:UIButtonTypeCustom] retain];
buton1.frame = CGRectMake(2, 0, 262, 102);
buton1.bounds = CGRectMake(2, 0, 262.0, 102.0);
[buton1 setTag:1];
[buton1 setImage:[UIImage imageNamed:@"left_gride.png"] forState:UIControlStateNormal];
[buton1 addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
     [scrollView addSubview:buton1];
Run Code Online (Sandbox Code Playgroud)

-(void) buttonClick:(UIButton*)button{
if ([button tag]==1)
{
     NSLog(@"position:%d",buton1.frame.origin.x);
}
else
{
    NSLog(@"position:%d",buton2.frame.origin.y);
}
Run Code Online (Sandbox Code Playgroud)

}

我的代码有什么问题.谢谢.

我也尝试过:

-(void) buttonClick:(UIButton*)button{
if ([button tag]==1)
{
     NSLog(@"position:%d",buton1.frame.origin.x);
}
else
{
    NSLog(@"position:%d",buton2.frame.origin.y);
}

-(void) buttonClick:(UIButton*)button{
if ([button tag]==1)
{
     NSLog(@"position:%d",button.frame.origin.x);
}
else …
Run Code Online (Sandbox Code Playgroud)

iphone position ipad ios

3
推荐指数
1
解决办法
1万
查看次数

SQL和PHP问题

这个查询有什么问题?

$query3 = "INSERT INTO Users 
             ('Token','Long','Lat') 
           VALUES 
             ('".$token."','".$lon1."','".$lat."')";
Run Code Online (Sandbox Code Playgroud)

php mysql sql

0
推荐指数
1
解决办法
92
查看次数