小编use*_*906的帖子

我自己的方法的自定义完成块

我刚发现完成块:

 completion:^(BOOL finished){


                     }];
Run Code Online (Sandbox Code Playgroud)

我需要做什么才能让自己的方法完成块?

objective-c objective-c-blocks

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

Swift 3 NSAttributedString多个属性

刚开始swift 3我遇到了快速语法问题.

我想要显示一个简单的NSAttributedString.

所以我先设定我的属性:

let attributeFontSaySomething : [String : AnyObject] = [NSFontAttributeName : UIFont.fontSaySomething()]
let attributeColorSaySomething : [String : AnyObject] = [NSForegroundColorAttributeName : UIColor.blue]
Run Code Online (Sandbox Code Playgroud)

然后我创建我的字符串:

let attStringSaySomething = NSAttributedString(string: "Say something", attributes: self.attributeFontSaySomething)
Run Code Online (Sandbox Code Playgroud)

我想要做的是创建具有我的2个属性的字符串,而不仅仅是一个.但当我这样做时:

let attStringSaySomething = NSAttributedString(string: "Say something", attributes: [self.attributeFontSaySomething, self.attributeColorSaySomething])
Run Code Online (Sandbox Code Playgroud)

Xcode告诉我,我不能并希望我为字典词典更改此内容.

如何在不使用NSMutableAttributedString?的情况下使用2个属性创建字符串?

nsattributedstring ios

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

将复制/粘贴菜单中使用的语言更改为英语以外的语言

我在 Info.plist 中将“本地化本地开发区域”设置为“法国”。尽管如此,a 上的复制/粘贴菜单UITextField仍然是英文的。我不明白为什么,我猜这个应用程序仍然是英文的。

我需要更改什么设置才能使此菜单使用法语?

localization uimenucontroller ios

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

滚动停止动画iOS

我的问题很简单,在我的UIVIewController上我有一个使用CAAnimation和UIViewAnimation动画的自定义UIView,我也有一个UIScrollView,当scrollView滚动动画UIView停止它的所有动画!

timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self 

selector:@selector(updateClock:) userInfo:nil repeats:YES];
hourHand.transform = CATransform3DMakeRotation (hourAngle+M_PI, 0, 0, 1);
...
Run Code Online (Sandbox Code Playgroud)

在动画视图中我使用:NSTimer,QuartzCore和UIViewAnimation.

怎么能避免这个?这是因为我使用自定义UIView?(我还是初学者)

谢谢大家!

uiscrollview caanimation uiviewanimation ios

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

提交第一个iOS应用.我需要做什么?

我现在正在提交我的第一个iOS应用程序,

我删除了所有.NSLog但我想知道我是否必须删除所有评论://a./* */如果我不删除评论,性能会受到影响吗?(有很多评论)

我一般应该照顾什么?

我是否需要包含推送通知证书?

我在哪里设置我的应用程序的语言,我希望它是法语,所以我已经将info.plist本地化本地开发区域设置为法国,但是在播放视频而不是"Terminé"时我仍然有"完成"按钮用法语!

谢谢大家,我会接受任何建议!

iphone app-store ios ios6

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