• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ArgenBarbie
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页
2016年7月20日
translatesAutoresizingMaskIntoConstraints
摘要: 如果是从代码层面开始使用Autolayout,需要对使用的View的translatesAutoresizingMaskIntoConstraints的属性设置为NO,即可开始通过代码添加Constraint,否则View还是会按照以往的autoresizingMask进行计算。而如果在Interf 阅读全文
posted @ 2016-07-20 17:13 ArgenBarbie 阅读(217) 评论(0) 推荐(0)
inout
摘要: 在函数声明时就用inout代替var 这样以后可以在函数内部修改外面的值 类似于C语言的传入指针 func change (inout num:Int) { num = 10 } var a = 20 change(&a) 得到的结果就是10 (注意:写了输入输出参数就不能再用默认函数值的语法了) 阅读全文
posted @ 2016-07-20 11:36 ArgenBarbie 阅读(334) 评论(0) 推荐(0)
2016年7月19日
字符串连接
摘要: ==》 阅读全文
posted @ 2016-07-19 17:49 ArgenBarbie 阅读(134) 评论(0) 推荐(0)
content.boundingRectWithSize计算出来的高度不准
摘要: 计算出来的高度会少一行的高度,最后一行会显示不全。减掉padding会解决这个问题。 let padding = self.reviewText.textContainer.lineFragmentPadding let actualWidth = DishReviewViewController. 阅读全文
posted @ 2016-07-19 12:36 ArgenBarbie 阅读(3218) 评论(0) 推荐(1)
addViewController之后view里面的点击事件不响应
摘要: let dealsSeeMoreViewController = DealsSeeMoreViewController(owner: self) self.dealsStackView.addArrangedSubview(dealsSeeMoreViewController.view) 只写上面两 阅读全文
posted @ 2016-07-19 11:14 ArgenBarbie 阅读(1881) 评论(0) 推荐(0)
2016年6月19日
131. 132. Palindrome Partitioning *HARD* -- 分割回文字符串
摘要: 131. Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome 阅读全文
posted @ 2016-06-19 23:21 ArgenBarbie 阅读(218) 评论(0) 推荐(0)
2016年5月8日
130. Surrounded Regions -- 被某字符包围的区域
摘要: Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded 阅读全文
posted @ 2016-05-08 13:00 ArgenBarbie 阅读(262) 评论(0) 推荐(0)
128. Longest Consecutive Sequence *HARD* -- 寻找无序数组中最长连续序列的长度
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes 阅读全文
posted @ 2016-05-08 10:04 ArgenBarbie 阅读(346) 评论(0) 推荐(0)
2016年5月5日
127. 126. Word Ladder *HARD* -- 单词每次变一个字母转换成另一个单词
摘要: 127. Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endW 阅读全文
posted @ 2016-05-05 20:14 ArgenBarbie 阅读(487) 评论(0) 推荐(0)
2016年5月4日
121. 122. 123. 188. Best Time to Buy and Sell Stock *HARD* 309. Best Time to Buy and Sell Stock with Cooldown -- 买卖股票
摘要: 121. Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transa 阅读全文
posted @ 2016-05-04 17:57 ArgenBarbie 阅读(183) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3