http://stackoverflow.com/questions/38408645/swift-regex-to-match-unicodes
The Unicode code point of the emoji you have shown is U+1F600.
(Unicode 9.0 Character Code Charts - Emoticons)
And your regex pattern (which may work for UTF-16 repres[......]
http://stackoverflow.com/questions/38408645/swift-regex-to-match-unicodes
The Unicode code point of the emoji you have shown is U+1F600.
(Unicode 9.0 Character Code Charts - Emoticons)
And your regex pattern (which may work for UTF-16 repres[......]
private lazy var textField: UITextView = {
let fontSize: CGFloat = 16
let tv = UITextView()
tv.font = UIFont.systemFont(ofSize: fontSize)
tv.textAlignment = .center
var text = NSMutableAttributedString[......]
如何encode:
let urlStrEncode = urlStr.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)
或者
let urlStrEncode = urlStr.stringByAddingPercentEncodingWithAllowedCharacters( NSCharacterSet.URLQueryAllowedCharacterSet())
顺道再贴下如何decode:
let[......]
如果使用了UINavigationViewController,在iOS7后,默认的子viewcontroller会跑到navvc的底下,遮挡一部分,解决方法是设置:
class BaseViewController: UIViewController {
override func viewDidLoad() {
// make vc top edge start from navigation bar's bottom
self.edges[......]
转载自:http://www.jianshu.com/p/390d3321b4c0
1. iPhone尺寸规格
2. 单位inch(英寸)
1 inch = 2.54cm = 25.4mm
3. iPhone手机宽高
上表中的宽高(width/height)为手机的物理尺寸,包括显示屏和边框。
以下为iPhone4s的宽高示意图:
4. 屏幕尺寸
我们通常所说的iPhone5屏幕尺寸为4英寸、iPhone6屏幕[......]