我的问题是在ios 8中没有得到当前位置的纬度和经度.我试图在ios 8的.plist文件中设置密钥,但是没有调用这个方法 - didUpdateToLocation:请帮助解决这个问题.
我的代码是: -
- (void)viewDidLoad
Run Code Online (Sandbox Code Playgroud)
{
[super viewDidLoad];
self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
if(IS_OS_8_OR_LATER) {
//[self.locationManager requestWhenInUseAuthorization];
[self.locationManager requestWhenInUseAuthorization];
[self.locationManager startUpdatingLocation];
}
Run Code Online (Sandbox Code Playgroud)
}
我已经将自定义颜色设置为QLPreviewController的导航栏,但问题是我想在QLPreviewController中使用深色的导航栏,即使我已将导航栏半透明属性设置为否但我不知道为什么它不起作用
我希望它像下面的图像

但它显示像这个图像

QLPreviewController *previewer = [[QLPreviewController alloc] init];
// Set data source
[previewer setDataSource:self];
[previewer setDelegate:self];
// Which item to preview
[previewer setCurrentPreviewItemIndex:index];
[previewer.view addGestureRecognizer:singleTap];
previewer.navigationController.navigationBar.translucent = NO;
previewer.navigationController.navigationBar.barTintColor = [UIColor redColor];
self.navigationController.navigationBar.translucent=NO;
self.navigationController.navigationBar.barTintColor = [UIColor redColor];
[self.navigationController pushViewController:previewer animated:TRUE ];
Run Code Online (Sandbox Code Playgroud)
即使我也尝试过这样但它也没有用
- (id <QLPreviewItem>)previewController: (QLPreviewController *)controller previewItemAtIndex:(NSInteger)index
{
// Break the path into it's components (filename and extension)
// Use the filename (index 0) and the extension (index 1) to get path
//lblFileName.text=[strFileName stringByReplacingOccurrencesOfString:@"movefile" withString:@""];
// For navigation …Run Code Online (Sandbox Code Playgroud) iphone uinavigationbar uinavigationcontroller qlpreviewcontroller ios7
我想在textfield占位符文本中添加必填字段标记,如下图所示,请告诉我,我完全搞糊涂该怎么办
