mirror of
https://github.com/wahyd4/libr-ios.git
synced 2026-08-09 05:06:46 +10:00
#12 禁止横屏
This commit is contained in:
@@ -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"/>
|
||||
|
||||
@@ -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!
|
||||
|
||||
}
|
||||
|
||||
@@ -56,8 +56,6 @@
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user