美文网首页
ios 经常用到的一些 API

ios 经常用到的一些 API

作者: 宁静世界 | 来源:发表于2018-10-18 10:42 被阅读0次
    
    //屏幕宽度
    let YYScreenWidth = UIScreen.main.bounds.size.width
    //屏幕高度
    let YYScreenHeigth = UIScreen.main.bounds.size.height
    //状态栏高度
    let YYStatusBarHeight = UIApplication.shared.statusBarFrame.height
    //获取tabbar 高度
    let tabBarHeight = self.tabBarController?.tabBar.bounds.size.height
    //字符串截取
    (str1 as! NSString).substring(to: 260)
    //去除首尾空格
    text = text.trimmingCharacters(in: .whitespaces)
    //去除所有空格
    text = text.replacingOccurrences(of: " ", with: "", options: .literal, range: nil)
    //判断是否包含
    data.display_name.lowercased().contains(inputSearchText!.lowercased())
    //比较是否相等
    str1.lowercased().compare(str2.lowercased()).rawValue==0
    //切割为数组
    str1.components(separatedBy: "_")
    

    相关文章

      网友评论

          本文标题:ios 经常用到的一些 API

          本文链接:https://www.haomeiwen.com/subject/wdsjzftx.html