随笔分类 -  Swift

移动ios雨燕开发
Swift 添加到TableView实现动画效果
摘要:let indexPath = NSIndexPath(forRow:0 ,inSection:0)self.tableView.insertRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.Automat... 阅读全文

posted @ 2015-01-23 00:19 大木哥 阅读(479) 评论(0) 推荐(0)

Swift 动态创建提示框
摘要:var alert = UIAlertController(title: "", message: "", prefferedStyle: UIAlertControllerStyle.Alert)//添加按钮let oneAction = UIAlertAction(title: "", styl... 阅读全文

posted @ 2015-01-22 23:54 大木哥 阅读(313) 评论(0) 推荐(0)

Swift分割字符串
摘要:var str_componets = "I Like Swift "str_componets.componentsSeparatedByString(" ")这样,str_componets分成了四部分:["I", "Like", "Swift", ""]也可以用NSCharacterSet进行... 阅读全文

posted @ 2015-01-08 18:02 大木哥 阅读(4043) 评论(0) 推荐(0)

Swift去除两边的特定字符(空格或其它)
摘要:var str_trim = " !hi !23 !"str_trim.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())//"!hi !23 !"去掉两边的空格str_trim.stringByTr... 阅读全文

posted @ 2015-01-08 17:56 大木哥 阅读(2837) 评论(0) 推荐(0)

导航