#12 禁止横屏

This commit is contained in:
ylzheng
2015-10-06 09:11:19 +08:00
parent 5713f192ee
commit 8f81cf0fdf
5 changed files with 13 additions and 4 deletions
+1
View File
@@ -507,6 +507,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<connections>
<outlet property="contextView" destination="OV8-aP-e6c" id="X1c-tG-evf"/>
<outlet property="createAtLabel" destination="6eW-Iw-LyZ" id="2HB-mZ-e1d"/>
<outlet property="likeNumLabel" destination="NP2-uk-kl7" id="FCt-kd-UfG"/>
<outlet property="nameLabel" destination="rFX-WH-9eA" id="aNo-Jz-pUk"/>
<outlet property="readNumLabel" destination="KE5-Gm-Yso" id="qu8-qa-NC6"/>
+2 -1
View File
@@ -19,5 +19,6 @@ class CustomTableCell: UITableViewCell {
@IBOutlet weak var thumbnilImageView: UIImageView!
@IBOutlet weak var contextView: UIView!
@IBOutlet weak var contextLable: UILabel!
@IBOutlet weak var createAtLabel: UILabel!
}
-2
View File
@@ -56,8 +56,6 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
+1 -1
View File
@@ -111,8 +111,8 @@ struct LibrxService {
var posts:[Post] = []
for index in 0..<json.count {
let postData = json[index]
print(postData)
let post: Post = JsonPaser.parsePost(postData)
posts.append(post)
}
+9
View File
@@ -119,8 +119,17 @@ class StorysTableViewController: UITableViewController {
cell.nameLabel.text = post.getformatPostTitle()
cell.readNumLabel.text = String(post.viewedTimes)
cell.likeNumLabel.text = String(post.likeCount)
let dateFormatter:NSDateFormatter = NSDateFormatter()
dateFormatter.locale = NSLocale(localeIdentifier: "zh_CN") // zh_CN en_US
dateFormatter.dateFormat = "yyyy-MM-dd"
let createAt = dateFormatter.dateFromString(post.createdAt)
cell.createAtLabel.text = String(createAt)
let thumbnailUrl = NSURL(string: post.thumbnail)
cell.thumbnilImageView.sd_setImageWithURL(thumbnailUrl, placeholderImage: UIImage(named: "default"))
return cell
}