我有一个不同的UIStoryboard UIViewControllers,我想添加另一个UIViewController(如仪表板),当用户从左侧滑动ipad时,仪表板会出现,然后当他向后滑动时,当前视图将被恢复.
这可能吗?如果是的话有什么提示怎么做或任何好的教程UIGestureRecognizer?
谢谢.
objective-c uiviewcontroller uigesturerecognizer ios swipe-gesture
我有一个解析为数组的NSDictionary,其中一个元素是date,我尝试使用[startimeArray sortUsingSelector:@selector(compare:)];(starttimeArray)是我的日期,但它只安排升序.我怎样才能按降序排序.谢谢
我有两个UIViews需要转换为PDF并作为附件发送.我的代码与第一个代码重叠UIView.我想将此作为电子邮件的附件发送.
谢谢.
NSMutableData *pdfData=[NSMutableData data];
UIGraphicsBeginPDFContextToData(pdfData,aView.bounds, nil);
CGContextRef pdfContext=UIGraphicsGetCurrentContext();
UIGraphicsBeginPDFPage();
[aView.layer renderInContext:pdfContext];
UIGraphicsEndPDFContext();
UIGraphicsBeginPDFContextToData(pdfData, bView.bounds, nil);
CGContextRef pdfContext2=UIGraphicsGetCurrentContext();
UIGraphicsBeginPDFPage();
[bView.layer renderInContext:pdfContext2];
UIGraphicsEndPDFContext();
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
NSString *subject=[NSString stringWithFormat:@"Delivery Report-%@",[globUserID uppercaseString]];
[mailer setSubject:subject];
[mailer addAttachmentData:pdfData mimeType:@"pdf" fileName:@"DeliveryReport.pdf"];
[self presentModalViewController:mailer animated:YES];
Run Code Online (Sandbox Code Playgroud) 可能重复:
如何使用双引号将NSString初始化为文本
如何在NSString中的变量中添加tan实际双引号以在NSDictionary中使用?例
NSString *ename=@"John Doe";
NSDictionary *profile=@{@"Profile":@{"Name":ename}};
Run Code Online (Sandbox Code Playgroud)
我需要显示如下"个人资料":{"姓名":"John Doe"}