小编cha*_*shu的帖子

在演示文稿正在进行时警告的含义!

当我在我的项目中整合Instagram时.我得到一个imageUIImagePickerController后它,我想将它发送到Instagram的但是当我发送imageInstagram的通过UIDocumentInteractionController委托方法presentOptionsMenuFromRect:inView: animated: 是这样

[documentInteractionController presentOptionsMenuFromRect:CGRectZero inView:self.view animated:YES];
Run Code Online (Sandbox Code Playgroud)

警告出现警告:在演示文稿正在进行时尝试显示<_UIDocumentActivityViewController:0x7584780>!
该应用程序不是崩溃.但我没有得到问题.为什么会出现此警告及其含义.我在互联网上搜索并阅读有关此问题,但没有得到任何答案.帮我 !!

iphone objective-c uinavigationcontroller

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

图像不会从ios 6发布在Instagram上

我正在使用Instagram将Instagram集成到我的应用程序中instagram-ios-sdk.我可以成功login访问Instagram并获得访问令牌,但在此之后,当我尝试使用UIDocumentInteractionControllerfrom 发布图片时UIImagePickerController,图片不会发布.发送图片的代码如下:

(void)_startUpload:(UIImage *) image {
    NSLog(@"Image Object = %@",NSStringFromCGSize(image.size));
    NSString  *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Test.igo"];
    [UIImageJPEGRepresentation(image, 1.0) writeToFile:jpgPath atomically:YES];
    NSLog(@"file url  %@",jpgPath);

    NSURL *igImageHookFile = [[NSURL alloc] init];
igImageHookFile = [NSURL fileURLWithPath:jpgPath];
NSLog(@"File Url = %@",igImageHookFile);

    documentInteractionController.UTI = @"com.instagram.photo";
    [UIDocumentInteractionController interactionControllerWithURL:igImageHookFile];
    [self setupControllerWithURL:igImageHookFile usingDelegate:self];

    [documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];
}

(UIDocumentInteractionController *) setupControllerWithURL: (NSURL*) fileURL  usingDelegate: (id <UIDocumentInteractionControllerDelegate>) interactionDelegate {
    NSLog(@"%@",fileURL);
    UIDocumentInteractionController *interactionController =
        [UIDocumentInteractionController interactionControllerWithURL: fileURL];
    interactionController.delegate = interactionDelegate;

    return interactionController;
} …
Run Code Online (Sandbox Code Playgroud)

iphone ios instagram

6
推荐指数
1
解决办法
747
查看次数

不同设备上相同大小的字体大小不同

嗨,我是大小班的新人.据我所知,Apple为Portrait iPhone 4s,5,6和6+提供了一个尺寸等级(Compact + Regular).那么如何在这三种不同的设备中提供不同的字体大小通过故事板或任何其他方式来实现.谢谢快乐编码

iphone ios autolayout size-classes

5
推荐指数
1
解决办法
794
查看次数

在swift中解析CSV文件

我在github的帮助下将数据从csv文件解析为字典.
解析后我得到这种类型的字典: -

{
"" = "";
"\"barred_date\"" = "\"\"";
"\"company_id\"" = "\"1\"";
"\"company_name\"" = "\"\"";
"\"contact_no\"" = "\"1234567890\"";
"\"created_date\"" = "\"2015-06-01 12:43:11\"";
"\"current_project\"" = "\"111\"";
"\"designation\"" = "\"Developer\"";
"\"doj\"" = "\"2015-06-01 00:00:00\"";
"\"fin_no\"" = "\"ABC001\"";
"\"first_name\"" = "\"sssd\"";
"\"last_name\"" = "\"dd\"";
"\"project_name\"" = "\"Project 1\"";
"\"qr_code\"" = "\"12345678\"";
"\"resignation_date\"" = "\"\"";
"\"status\"" = "\"1\"";
"\"work_permit_no\"" = "\"ssdda11\"";
"\"worker_id\"" = "\"1\"";
"\"worker_image\"" = "\"assets/uploads/workers/eb49364ca5c5d22f11db2e3c84ebfce6.jpeg\"";
"\"worker_image_thumb\"" = "\"assets/uploads/workers/thumbs/eb49364ca5c5d22f11db2e3c84ebfce6.jpeg\"";}
Run Code Online (Sandbox Code Playgroud)

如何将其转换为简单字典.我需要这样的数据"company_id"="1"

谢谢

csv parsing ios swift

4
推荐指数
3
解决办法
6306
查看次数

DateFormatter在ios中不起作用通过设置

我在xcode 6.2中使用了日期格式化程序和swift.它在ios 8.1中正常工作但是当我在8.1以上的ios中测试我的应用程序时(我在8.2和8.4中尝试过),日期格式化程序无效.有没有人面临类似的问题.这是我得到的日期类型.字符串格式10-08-2015T13:59:53 + 0000.我需要在日期格式化器中使用格式"dd-MM-yyyy'T'HH:mm:ssZZZ"转换它, 这是我将字符串转换为日期的方法: -

func dateFromString(dateString:String)->NSDate
    {

        print(dateString)
        var dateFormatter = NSDateFormatter()

        //yyyy-MM-dd'T'HH:mm:ss.SSSZZZZ
        dateFormatter.dateFormat = "dd-MM-yyyy'T'HH:mm:ssZZZ"

        var date = dateFormatter.dateFromString(dateString)
        print(date)
        return date!
    }
Run Code Online (Sandbox Code Playgroud)

对不起,我正在编辑Qusetion.我发现了为什么会这样.在iphone的设置页面中,如果24_hour_time为On,则为日期和时间.它工作正常.如果它关闭那么只有日期格式化程序给出了nil date.I插入了GMT.它在8.1.3中正常工作但是给出了8.4中的问题

 dateFormatter.timeZone = NSTimeZone(name: "GMT")
Run Code Online (Sandbox Code Playgroud)

谢谢快乐编码

date-format swift xcode-6.2 ios8.4

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