我在我的iPhone应用程序中使用了一个有色的导航栏和一个有色的全球UIToolbar.在我的信息视图中,我有一个打开MFMailComposeViewController的按钮,该视图顶部的工具栏(带有"取消"和"发送"按钮)仍为蓝色.我正在调用MFMailComposeViewController,如下所示:
-(void)displayMailSheet
{
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker setSubject:@"..."];
NSArray *toRecipients = [NSArray arrayWithObject:@"..."];
[picker setToRecipients:toRecipients];
[self presentModalViewController:picker animated:YES];
[picker release];
}
Run Code Online (Sandbox Code Playgroud)
是否可以更改该视图工具栏的颜色?如果有可能,我该怎么做?
我想测试如果我的应用程序无法获取位置坐标会发生什么.是否可以在模拟器中禁用位置服务,例如关闭WiFI的iPod Touch?
我仍然没有我的iPhone开发者计划证书,所以我无法在我的设备上测试它.
提前致谢!
我的应用程序中有一个NSString的问题.
我已经在我的视图控制器的头文件中定义了它.
NSString *locationCoordinates;
Run Code Online (Sandbox Code Playgroud)
我在一个 - (void)方法中设置它的值.
- (void)locationUpdate:(CLLocation *)location {
<...>
NSArray *locArray = [locString componentsSeparatedByString:@", "];
NSString *xCoordinate = [locArray objectAtIndex:0];
NSString *yCoordinate = [locArray objectAtIndex:1];
locationCoordinates = [NSString stringWithFormat:@"%@,%@", xCoordinate, yCoordinate];
}
Run Code Online (Sandbox Code Playgroud)
在这种方法中,我可以将其打印到控制台
NSLog(locationCoordinates);
Run Code Online (Sandbox Code Playgroud)
但如果我想在另一种方法中在控制台中查看它,我的应用程序会立即退出.
- (IBAction)saveAndReturnToRootView {
NSLog(locationCoordinates);
}
Run Code Online (Sandbox Code Playgroud)
控制台告诉我:
2010-02-24 14:45:05.399 MyApp[73365:207] *** -[NSCFSet length]: unrecognized selector sent to instance 0x4c36490
2010-02-24 14:45:05.400 MyApp[73365:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFSet length]: unrecognized selector sent to instance 0x4c36490'
2010-02-24 14:45:05.401 MyApp[73365:207] …Run Code Online (Sandbox Code Playgroud) 我正在使用以下代码在我的应用中加载视图:
- (void)showPicker {
ImagePickerViewController *imagePickerView = [[ImagePickerViewController alloc] initWithNibName:@"ImagePickerViewController" bundle:nil];
[self.navigationController presentModalViewController:imagePickerView animated:YES];
Run Code Online (Sandbox Code Playgroud)
}
如何通过卷曲/卷曲过渡加载它?
提前致谢,
亚辛
iphone ×3
objective-c ×2
animation ×1
colors ×1
crash ×1
ios ×1
memory ×1
mfmailcomposeviewcontroller ×1
nsstring ×1
toolbar ×1
transition ×1