Tag: uikit

在模态页面上显示模态表单

在iPad上,我使用modalPresentationStyle UIModalPresentationPageSheet显示一个模态视图控制器。 该视图控制器使用modalPresentationStyle UIModalPresentationFormSheet显示另一个模式视图控制器。 因此,用户看到背景视图控制器,页面页面和表格页面都是相互重叠的,因为表格页面小于页面页面。 页面的表示让背景变暗,以至于无法与之交互。 但是,表单不会使iOS 5的页面变暗,以便用户仍然可以与下面的页面页面交互。 但是我希望页面也变暗,以便用户在可以再次与页面交互之前closures模式表单。 在iOS 4上,这是默认行为,但在iOS 5上,我找不到实现此目的的方法。 你有什么build议吗?

如何删除UIPopoverController中的“模糊”投影

UIPopoverController的视图出现时,我不想要投影。 有没有办法去掉这个阴影效果呢?

UIGraphicsBeginPDFPage()在64位设备上随机崩溃(CGPDFSecurityManagerCreateDecryptor())

我正在努力使用PDF导出方法,直到我将应用程序移植到arm64架构。 Bacisally,该方法打开一个现有的PDF,它创build一个新的PDF文件,并绘制第一个PDF的内容到新创build的一个,然后添加更多的内容页面。 当该方法尝试创build一个新的pdf页面到文档(在第一个pdf被集成到新的pdf之后),该应用程序在UIGraphicsBeginPDFPage()上出现EXC_BAD_ACCESS警告。 打电话。 它只发生在一些PDF文件,不是所有的,只在64位设备上。 下面是显示CGPDFSecurityManagerCreateDecryptor()调用的堆栈跟踪,我找不到它的function。 Thread 14Queue : NSOperationQueue 0x14f6dd3a0 :: NSOperation 0x17504a470 (serial) #0 0x00000001838aeee4 in CGPDFSecurityManagerCreateDecryptor () #1 0x00000001838d1004 in pdf_filter_chain_create () #2 0x0000000183831e00 in CGPDFStreamCreateFilterChain () #3 0x000000018383226c in chain_get_bytes () #4 0x0000000183b5e0ac in unpackImageRow () #5 0x0000000183b5dfd4 in PDFImageEmitData () #6 0x0000000183b5f684 in emit_image () #7 0x0000000183b5ef9c in PDFImageEmitDefinition () […]

当使用从Storyboard中的generics类inheritance的类时,“接口生成器文件中的未知类”

我最近BookTableViewController了我的类BookTableViewController从UITableViewController一个简单的inheritance,所以它现在inheritance自一个generics类FetchedResultsTableViewController<TResultType, TCellType> ,它本身从UITableViewControllerinheritance。 类声明看起来像这样: class BookTableViewController: FetchedResultsTableViewController<Book, BookTableViewCell> { override func viewDidLoad() { // breakpoints in here do not catch! } } class FetchedResultsTableViewController<TResultType, TCellType: UITableViewCell>: UITableViewController, NSFetchedResultsControllerDelegate { // implementation here } 在Storyboard中,Custom类和Module都被设置,我可以点击箭头跳转到BookTableViewController类的代码,这表明故事板正确链接到类。 但是,当我尝试运行该应用程序时,该类无法识别 – viewDidLoad()中的代码无法运行,并且在运行我的应用程序时收到以下logging的消息: Interface Builder文件中的未知类_TtC12Reading_List23BookTableViewController。 我正在运行XCode 7.3(Swift 2.2)。 这是故事板的一个限制,一个错误,或者我错过了什么? 谢谢! 更新 : 经过一番实验,似乎与genericsinheritance有关,而不是类的可访问性。 定义了以下类: import Foundation import UIKit // Both of […]

沿着一系列CGPoint移动图像

我有path存储在一个CGPoints数组,我想要移动一个图像。 这是我迄今为止的一般代码: -(void)movePic:(id)sender{ for(int i = 0; i < self.array.count; i++){ CGPoint location = [[self.array objectAtIndex:i] CGPointValue]; [UIView animateWithDuration:0.1 animations:^{ self.imageView.center = location; } completion:^(BOOL finished){ }]; } } 问题是for循环运行得非常快,所以你只能看到最后一点的animation。 我不确定如何更好地devise这个。 理想情况下,我可以做些什么来确保一个animation在另一个animation开始之前完成? 我不应该使用for循环吗? 谢谢

如何使iPhone屏幕变暗

我的iPhone屏幕上有一个刷新button,刷新当前视图中的表格。 屏幕刷新精美,但有一种方法可以使屏幕变暗,然后在桌子刷新后再次变亮?

为UIControlStateHighlighted定制UISearchBarIconClear不起作用

我有一个UISearchBar我已经为UiControlStateNormal设置了一个自定义的UISearchBarIconClear。 [mySearchBar setImage:myImage forSearchBarIcon:UISearchBarIconClear state:UIControlStateNormal]; 这部分工作,因为它应该,但不幸的是,当点击清除button,它从我设置的图像更改为原来的默认灰色。 我试图设置UIControlStateHighlighted图像,但显然这是行不通的。 文件实际上说 有效的状态是UIControlStateNormal和UIControlStateDisabled。 如果您不能将其设置为突出显示的状态,那么为默认状态设置自定义button有什么意义? 我错过了什么吗? 任何想法或变通赞赏,谢谢!

无法build立模组UIKit

突然它停止在设备上build设应用程序。 在模拟器的工作,但是当我连接设备,并尝试在设备上运行它给我一个错误: 无法build立模组UIKit 我尝试了很多,但解决不了。

导航栏button

当我在我的导航栏中放置两个右键栏button时,这两个button是可见的,但他们有一个顶部的边框意味着我不要那个边框。 我在我的框架中创build这些button,并将该框架分配给导航栏。 所以任何人都可以帮助我如何隐藏框架边框。 我的代码如下: UIBarButtonItem *btnAdd = [[UIBarButtonItem alloc] initWithTitle:@"Add" style:UIBarButtonItemStyleBordered target:self action:@selector(Add)]; UIBarButtonItem *btnEdit = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:self action:@selector(Edit)]; UIToolbar *rightToolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 100, 46)]; rightToolBar.backgroundColor = [UIColor clearColor]; rightToolBar.tintColor = [UIColor colorWithRed:40.0/255.0 green:48.0/255.0 blue:51.0/255.0 alpha:0.0]; NSArray *buttonsRight = [NSArray arrayWithObjects:btnEdit, btnAdd, nil]; [rightToolBar setItems:buttonsRight]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] […]

如何创build一个循环UIButton?

一切都在标题! 我想创build一个纯粹的圆形UIButton。 到目前为止我所能做的最好的是一个圆angular的方形button… Thx