sol*_*007 0 iphone itunes objective-c app-store ios
问候,
在我的一个项目中,我想在导航栏中创建后退类型按钮(带指针),我用Google搜索并发现使用以下代码,可以实现.
UIButton*someButton = [UIButton buttonWithType:101];
UIBarButtonItem*someBarButton = [[UIBarButtonItem alloc] initWithCustomView:someButton];
我想在Apple的应用程序商店上传这个应用程序.有没有机会这会让我的应用被拒绝,因为buttonWithType:101没有记录在哪里?此外,我不以其通用方式使用此按钮项,即它不会弹出视图控制器.
请指导.
问候,
小智 8
我建议您根据需要生成Image,只需运行此代码并在生成图像后将其删除:
- (void)viewDidLoad {
...
someButton = [UIButton buttonWithType:101];
UIBarButtonItem *someBarButton = [[UIBarButtonItem alloc] initWithCustomView:someButton];
self.navigationItem.leftBarButtonItem = someBarButton;
...
}
Run Code Online (Sandbox Code Playgroud)
和
- (void)viewWillAppear:(BOOL)animated {
....
UIImage *img1 = [someButton backgroundImageForState:UIControlStateNormal];
NSData *newData = UIImagePNGRepresentation(img1);
NSFileManager *fileManager =[NSFileManager defaultManager];
BOOL filecreationSuccess = [fileManager createFileAtPath:@"/Users/macbookmac/Desktop/tester.png" contents:newData attributes:nil];
...
}
Run Code Online (Sandbox Code Playgroud)
最有可能的是......在某些情况下,很少有东西可以在雷达下滑动,但为什么要抓住机会......
如果你是为你的客户/公司做这件事,你是否有可能从手上的app store拒绝..
创建一个尖头按钮图像并使用自定义按钮更安全...
| 归档时间: |
|
| 查看次数: |
2778 次 |
| 最近记录: |