小编Mic*_*ník的帖子

如何在将其连接到Xcode时通过密码自动解锁受保护的IOS设备

我的iPhone上有密码密码,每当我想尝试我的新版本时,我必须手动卸载设备.是否可以自动从Xcode解锁设备?像将密码插入钥匙串的东西.谢谢回复.

xcode

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

将NSAttributedString转换为字符串并返回

我有NSString,我需要制作NSAttributedString.

NSString是这样的:

bvcx b vcxbcvx bcxvbcxv bvx xbc bcvx bxcv bcxv bcxv bcxv bcvx bcvx bcxvbcvx bvc bcvx bxcv{
NSFont = "\"LucidaGrande 24.00 pt. P [] (0x108768a80) fobj=0x108788880, spc=7.59\"";
NSParagraphStyle = "Alignment 4, LineSpacing 0, ParagraphSpacing 0, ParagraphSpacingBefore 0, HeadIndent 0, TailIndent 0, FirstLineHeadIndent 0, LineHeight 0/0, LineHeightMultiple 0, LineBreakMode 0, Tabs (\n    28L,\n    56L,\n    84L,\n    112L,\n    140L,\n    168L,\n    196L,\n    224L,\n    252L,\n    280L,\n    308L,\n    336L\n), DefaultTabInterval 0, Blocks (null), Lists (null), BaseWritingDirection -1, HyphenationFactor 0, TighteningFactor 0.05, HeaderLevel 0";
} …
Run Code Online (Sandbox Code Playgroud)

cocoa objective-c nsstring nsattributedstring

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

UIImageJPEGRepresentation抛出EXC BAD ACCESS

我有功能,它收到2个参数 - 图像和数字.下面的函数抛出EXC BAD ACCESS行"imgData = UIImageJPEGRepresentation(image,1.0);".我不知道为什么:-(任何想法?

- (void)saveImages:(UIImage*)image row:(int)row {
  if (image != nil) {
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString* path1 = [documentsDirectory stringByAppendingPathComponent: 
                      [NSString stringWithFormat:@"%i.JPEG", row]];
    NSString* path2 = [documentsDirectory stringByAppendingPathComponent: 
                      [NSString stringWithFormat:@"%is.JPEG", row]];

    NSData* imgData;
    imgData = UIImageJPEGRepresentation(image, 1.0);
    [imgData writeToFile:path1 atomically:YES];

    [self rotateIcon:image];
    image = [self imageWithImage:image];
    NSData* smalImgData = UIImageJPEGRepresentation(image, 1.0);
    [smalImgData writeToFile:path2 atomically:YES];
  }
}
Run Code Online (Sandbox Code Playgroud)

cocoa-touch image exc-bad-access uikit uiimagejpegrepresentation

5
推荐指数
0
解决办法
1395
查看次数

DFP问题:无广告显示

我的应用在UIScrollView中提供了三个广告(通过DoubleClick for Publisher).我使用适用于iOS的旧版AdMob SDK,一切正常.我决定下载新版本,因为AppStore存在一些问题.一旦我添加了新版本,我就会收到错误:

Error Domain=com.google.ads Code=1 "Request Error: No ad to show." UserInfo=0x14e88e60 {NSLocalizedDescription=Request Error: No ad to show., NSLocalizedFailureReason=Request Error: No ad to show.}
Run Code Online (Sandbox Code Playgroud)

广告具有自定义尺寸的广告素材(320x125).添加它的UIScrollView是960x125,它被放置为UITableView的标题.

横幅代码:

- (void)viewDidLoad {
    [super viewDidLoad];

    DFPBannerView *bannerView = (DFPBannerView *)self.view;
    [self preventBannerCaptureTouch:bannerView];
    // Create a view of the standard size at the bottom of the screen.
    // Available AdSize constants are explained in GADAdSize.h.
    //bannerView = [[DFPBannerView alloc] initWithAdSize:CG];
    bannerView.adSize = GADAdSizeFromCGSize(CGSizeMake(320, 125));
    // Specify the ad's "unit identifier." This is your …
Run Code Online (Sandbox Code Playgroud)

admob ios google-dfp

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