我正在寻找iOS 7的iOS字体列表.我在Apple的开发者网站上找到了这个列表,我只是想知道是否有人知道一个可视列表,其中每个字体名称都是在其字体中输入的.我之前看过一两个,但我见过的最新版本是针对iOS 5的,从那时起又添加了更多.
我收到一封电子邮件,我最近提交给Apple的iOS/Watch OS应用程序的二进制文件无效,原因如下:
该应用程序链接到PlugIns/iPrayed.appex/iPrayed WatchKit App.app/_WatchKitStub/WK中的非公共库:/System/Library/PrivateFrameworks/SockPuppetGizmo.framework/SockPuppetGizmo
我之前提交过这个版本没有任何问题,只对几行代码进行了一些更改,而没有添加任何内容.有什么想法这是关于什么的?
我的所有应用程序目前都是用Obj-C编写的.有关使用3D Touch实现主屏幕快捷方式的示例代码的链接https://developer.apple.com/library/content/samplecode/ApplicationShortcuts/Introduction/Intro.html#//apple_ref/doc/uid/TP40016545已完全编译在斯威夫特.任何人都会遇到Obj-C的文档,所以我不需要通过我的AppDelegate进行翻译了吗?
更新:
添加Info.plist中的所有快捷方式后,我在AppDelegate.m中添加了:
- (void)application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem *)shortcutItem completionHandler:(void (^)(BOOL))completionHandler {
UINavigationController *nav = (UINavigationController *) self.tabBarController.selectedViewController;
NSLog(@"%@", shortcutItem.type);
if ([shortcutItem.type isEqualToString:@"com.316apps.iPrayed.addPrayerRequest"]) {
Requests *gonow = [[Requests alloc] init];
[nav pushViewController:gonow animated:YES];
}
if ([shortcutItem.type isEqualToString:@"com.316apps.iPrayed.addPrayer"]) {
PrayerStats *controller = [[PrayerStats alloc] init];
[nav pushViewController:controller animated:YES];
}
if ([shortcutItem.type isEqualToString:@"com.316apps.iPrayed.addFast"]) {
FastStats *controller1 = [[FastStats alloc] init];
[nav pushViewController:controller1 animated:YES];
}
if ([shortcutItem.type isEqualToString:@"com.316apps.iPrayed.addStudy"]) {
StudyStats *controller2 = [[StudyStats alloc] init];
[nav pushViewController:controller2 animated:YES];
}
}
Run Code Online (Sandbox Code Playgroud)
这允许它工作,而不需要添加任何其他方法,或者向didFinishLaunchingWithOptions添加任何内容.
我的应用程序设置为使用AVCaptureSession从摄像机录制视频,但是没有音频.如何录制音频然后将其添加到文件的videoOutput中我需要做什么?这是录制视频的代码:
AVCaptureSession *session = [[AVCaptureSession alloc] init];
[session beginConfiguration];
session.sessionPreset = AVCaptureSessionPresetMedium;
CALayer *viewLayer = self.vImagePreview.layer;
NSLog(@"viewLayer = %@", viewLayer);
AVCaptureVideoPreviewLayer *captureVideoPreviewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session];
captureVideoPreviewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;
captureVideoPreviewLayer.frame = self.vImagePreview.bounds;
[self.vImagePreview.layer addSublayer:captureVideoPreviewLayer];
AVCaptureDevice *device = [self frontFacingCameraIfAvailable];
NSError *error = nil;
AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device error:&error];
if (!input) {
// Handle the error appropriately.
NSLog(@"ERROR: trying to open camera: %@", error);
}
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectoryPath = [paths objectAtIndex:0];
AVCaptureMovieFileOutput *movieFileOutput = [[AVCaptureMovieFileOutput …Run Code Online (Sandbox Code Playgroud) objective-c audio-recording ios avcapturesession avcapturedevice
我试图在导航控制器中设置后退按钮的色调颜色,但没有任何工作.我试过了
[self.navigationController.backBarButtonItem setTintColor:myColor];
//myColor was previously set
Run Code Online (Sandbox Code Playgroud)
但它保持默认色调
我有关于如何在iOS 10.3中设置备用图标的信息,在Info.plist中添加密钥.但是,我不确定每个替代品需要哪种尺寸.我现在使用资产文件夹,并且必须为聚光灯,不同的iphone和ipad尺寸等放入大约12个不同大小的图标.备用的规则是什么?
这不是重复的可能性.它询问您是否必须包含备用图标的每个尺寸
我非常需要为我的应用做离线地图,因为它主要是为泰国制作的,因为泰国通常很难连接互联网.我现在正在使用OpenStreetMap我的MKTileOverlay但是在实现它以供离线使用时遇到问题.我找到了一个教给子类的教程MKTileOverlay.所以,在我ViewController的地图上我有:
- (void)viewWillAppear:(BOOL)animated {
CLLocationCoordinate2D coord = {.latitude = 15.8700320, .longitude = 100.9925410};
MKCoordinateSpan span = {.latitudeDelta = 3, .longitudeDelta = 3};
MKCoordinateRegion region = {coord, span};
[mapView setRegion:region];
}
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Map";
NSString *template = @"http://tile.openstreetmap.org/{z}/{x}/{y}.png";
self.overlay = [[XXTileOverlay alloc] initWithURLTemplate:template];
self.overlay.canReplaceMapContent = YES;
[mapView addOverlay:self.overlay level:MKOverlayLevelAboveLabels];
}
- (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id)overlay {
return [[MKTileOverlayRenderer alloc] initWithTileOverlay:overlay];
}
Run Code Online (Sandbox Code Playgroud)
在我的子类中MKTileOverlay,我有:
- (NSURL *)URLForTilePath:(MKTileOverlayPath)path { …Run Code Online (Sandbox Code Playgroud) 我昨天升级到了Xcode 6.3.从那以后,我一直无法构建任何具有Parse.framework的东西.对于PFConstants.h,我得到错误
nullability specifier '_nullable' cannot be applied to non-pointer
我之前从未见过这个错误,除了更新到6.3之外什么都没有改变.有任何想法吗?
我试图在我的表格视图中让iOS 7上的拉动刷新功能正常工作.在viewDidLoad上,我有:
self.refreshControl = [[UIRefreshControl alloc] init];
[self.refreshControl addTarget:self action:@selector(refreshInvoked:forState:) forControlEvents:UIControlEventValueChanged];
Run Code Online (Sandbox Code Playgroud)
然后我跑:
-(void) refreshInvoked:(id)sender forState:(UIControlState)state {
// Refresh table here...
[_allEntries removeAllObjects];
[self.tableView reloadData];
[self refresh];
}
Run Code Online (Sandbox Code Playgroud)
当刷新方法调用的请求完成后,在didCompleteRequest代码中,我有:
[self.refreshControl endRefreshing];
Run Code Online (Sandbox Code Playgroud)
在iOS 6上,这意味着当你向下拉动表格视图时,它会显示在你拉动时伸展的圆形箭头,并且在拉得足够远之后,它会刷新.但是现在,我看不到圆形箭头,只是一个UIActivityIndicator.它有时也会工作,有时也不会.我错过了什么?
我想让我的应用程序将它创建的文档保存到iCloud Drive,但我很难跟上Apple写的内容.这是我到目前为止所做的,但我不确定从哪里开始.
UPDATE2
我的代码中有以下内容手动将文档保存到iCloud Drive:
- (void)initializeiCloudAccessWithCompletion:(void (^)(BOOL available)) completion {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
self.ubiquityURL = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil];
if (self.ubiquityURL != nil) {
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"iCloud available at: %@", self.ubiquityURL);
completion(TRUE);
});
}
else {
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"iCloud not available");
completion(FALSE);
});
}
});
}
if (buttonIndex == 4) {
[self initializeiCloudAccessWithCompletion:^(BOOL available) {
_iCloudAvailable = available;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *pdfPath = [documentsDirectory stringByAppendingPathComponent:selectedCountry];
NSURL* url = [NSURL fileURLWithPath: pdfPath]; …Run Code Online (Sandbox Code Playgroud) ios ×9
xcode ×4
objective-c ×3
swift ×2
3dtouch ×1
apple-watch ×1
icloud ×1
icons ×1
info.plist ×1
ios7 ×1
ios8 ×1
ios9 ×1
iphone ×1
mapkit ×1
nullable ×1
typeface ×1
uidocument ×1
uifont ×1
watchos ×1