Skip to content

Commit

Permalink
tweet social name date down
Browse files Browse the repository at this point in the history
  • Loading branch information
machao committed Jan 30, 2016
1 parent c0d2314 commit 6a9adba
Show file tree
Hide file tree
Showing 8 changed files with 436 additions and 93 deletions.
26 changes: 8 additions & 18 deletions weibo-swift/weibo-swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
9B500D9F1C3CE45D0075F4FE /* WBStatusTimelineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B500D9D1C3CE45D0075F4FE /* WBStatusTimelineViewController.swift */; };
9B500DA11C3CE4870075F4FE /* WBStatusLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B500DA01C3CE4870075F4FE /* WBStatusLayout.swift */; };
9B500DA31C3CE7190075F4FE /* GlobleClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B500DA21C3CE7190075F4FE /* GlobleClass.swift */; };
9B5899681C5C803A0096FAC6 /* TWeetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B5899671C5C803A0096FAC6 /* TWeetCell.swift */; };
9B58996A1C5C87C90096FAC6 /* TWStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B5899691C5C87C90096FAC6 /* TWStatusView.swift */; };
9B66C7501C2925E200F4CB66 /* mew_baseline.gif in Resources */ = {isa = PBXBuildFile; fileRef = 9B66C74A1C2925E200F4CB66 /* mew_baseline.gif */; };
9B66C7511C2925E200F4CB66 /* mew_baseline.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 9B66C74B1C2925E200F4CB66 /* mew_baseline.jpg */; };
9B66C7521C2925E200F4CB66 /* mew_baseline.png in Resources */ = {isa = PBXBuildFile; fileRef = 9B66C74C1C2925E200F4CB66 /* mew_baseline.png */; };
Expand All @@ -51,20 +53,15 @@
9B80481F1C19CA80001D03F9 /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B8048181C19CA80001D03F9 /* AFURLResponseSerialization.m */; };
9B8048201C19CA80001D03F9 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B80481A1C19CA80001D03F9 /* AFURLSessionManager.m */; };
9B81C3C21C18511900A7B826 /* MCModelExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B81C3C11C18511900A7B826 /* MCModelExample.swift */; };

9B82EA261C5B3BA30067DFDA /* TWLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B82EA251C5B3BA30067DFDA /* TWLayout.swift */; };

9B85BF1B1C51CC6F00FEB679 /* WBStatusComposeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B85BF1A1C51CC6F00FEB679 /* WBStatusComposeController.swift */; };
9B85BF1D1C51DD0C00FEB679 /* WBStatusComposeTextParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B85BF1C1C51DD0C00FEB679 /* WBStatusComposeTextParser.swift */; };
9B8874011C59F2FA009CC1D2 /* twitter_0.json in Resources */ = {isa = PBXBuildFile; fileRef = 9B8873FD1C59F2FA009CC1D2 /* twitter_0.json */; };
9B8874021C59F2FA009CC1D2 /* twitter_1.json in Resources */ = {isa = PBXBuildFile; fileRef = 9B8873FE1C59F2FA009CC1D2 /* twitter_1.json */; };
9B8874031C59F2FA009CC1D2 /* twitter_2.json in Resources */ = {isa = PBXBuildFile; fileRef = 9B8873FF1C59F2FA009CC1D2 /* twitter_2.json */; };
9B8874041C59F2FA009CC1D2 /* twitter_3.json in Resources */ = {isa = PBXBuildFile; fileRef = 9B8874001C59F2FA009CC1D2 /* twitter_3.json */; };
9B8874061C59F415009CC1D2 /* TWHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B8874051C59F415009CC1D2 /* TWHelper.swift */; };

9B8874081C5A00B6009CC1D2 /* TWModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B8874071C5A00B6009CC1D2 /* TWModel.swift */; };


9B9152E41C1FECBE00A3AE5B /* ZSDPaymentForm.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9152DE1C1FECBE00A3AE5B /* ZSDPaymentForm.m */; };
9B9152E51C1FECBE00A3AE5B /* ZSDPaymentView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B9152E01C1FECBE00A3AE5B /* ZSDPaymentView.m */; };
9B9152E61C1FECBE00A3AE5B /* ZSDPaymentView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9B9152E11C1FECBE00A3AE5B /* ZSDPaymentView.xib */; };
Expand Down Expand Up @@ -293,6 +290,8 @@
9B500D9D1C3CE45D0075F4FE /* WBStatusTimelineViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WBStatusTimelineViewController.swift; sourceTree = "<group>"; };
9B500DA01C3CE4870075F4FE /* WBStatusLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WBStatusLayout.swift; sourceTree = "<group>"; };
9B500DA21C3CE7190075F4FE /* GlobleClass.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlobleClass.swift; sourceTree = "<group>"; };
9B5899671C5C803A0096FAC6 /* TWeetCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TWeetCell.swift; sourceTree = "<group>"; };
9B5899691C5C87C90096FAC6 /* TWStatusView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TWStatusView.swift; sourceTree = "<group>"; };
9B66C74A1C2925E200F4CB66 /* mew_baseline.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = mew_baseline.gif; sourceTree = "<group>"; };
9B66C74B1C2925E200F4CB66 /* mew_baseline.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = mew_baseline.jpg; sourceTree = "<group>"; };
9B66C74C1C2925E200F4CB66 /* mew_baseline.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mew_baseline.png; sourceTree = "<group>"; };
Expand All @@ -315,19 +314,15 @@
9B80481A1C19CA80001D03F9 /* AFURLSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLSessionManager.m; sourceTree = "<group>"; };
9B8048241C19CD84001D03F9 /* weibo-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "weibo-Header.h"; sourceTree = "<group>"; };
9B81C3C11C18511900A7B826 /* MCModelExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MCModelExample.swift; sourceTree = "<group>"; };

9B82EA251C5B3BA30067DFDA /* TWLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TWLayout.swift; sourceTree = "<group>"; };

9B85BF1A1C51CC6F00FEB679 /* WBStatusComposeController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WBStatusComposeController.swift; sourceTree = "<group>"; };
9B85BF1C1C51DD0C00FEB679 /* WBStatusComposeTextParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WBStatusComposeTextParser.swift; sourceTree = "<group>"; };
9B8873FD1C59F2FA009CC1D2 /* twitter_0.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = twitter_0.json; sourceTree = "<group>"; };
9B8873FE1C59F2FA009CC1D2 /* twitter_1.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = twitter_1.json; sourceTree = "<group>"; };
9B8873FF1C59F2FA009CC1D2 /* twitter_2.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = twitter_2.json; sourceTree = "<group>"; };
9B8874001C59F2FA009CC1D2 /* twitter_3.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = twitter_3.json; sourceTree = "<group>"; };
9B8874051C59F415009CC1D2 /* TWHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TWHelper.swift; sourceTree = "<group>"; };

9B8874071C5A00B6009CC1D2 /* TWModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TWModel.swift; sourceTree = "<group>"; };

9B9152DD1C1FECBE00A3AE5B /* ZSDPaymentForm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZSDPaymentForm.h; sourceTree = "<group>"; };
9B9152DE1C1FECBE00A3AE5B /* ZSDPaymentForm.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZSDPaymentForm.m; sourceTree = "<group>"; };
9B9152DF1C1FECBE00A3AE5B /* ZSDPaymentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZSDPaymentView.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1381,13 +1376,11 @@
children = (
9B8873FC1C59F2FA009CC1D2 /* Api dump */,
9BD898131C30FC2F0002C416 /* T1HomeTimelineItemsViewController.swift */,

9B82EA251C5B3BA30067DFDA /* TWLayout.swift */,
9B8874051C59F415009CC1D2 /* TWHelper.swift */,
9B5899671C5C803A0096FAC6 /* TWeetCell.swift */,
9B5899691C5C87C90096FAC6 /* TWStatusView.swift */,
9B8874071C5A00B6009CC1D2 /* TWModel.swift */,

9B8874051C59F415009CC1D2 /* TWHelper.swift */,

);
path = Twitter;
sourceTree = "<group>";
Expand Down Expand Up @@ -1683,9 +1676,7 @@
9B2301B51C170667002EBF76 /* AppDelegate.swift in Sources */,
9B80481F1C19CA80001D03F9 /* AFURLResponseSerialization.m in Sources */,
9BD331E81C1ACC8F008C9557 /* MCSignViewModel.swift in Sources */,

9B82EA261C5B3BA30067DFDA /* TWLayout.swift in Sources */,

9BD519B81C4245A900F57EED /* NSObject+YYAddForKVO.m in Sources */,
9BD519F81C4245A900F57EED /* YYReachability.m in Sources */,
9BD4FA891C297AC6007B9D33 /* MCTextAttributeExampleController.swift in Sources */,
Expand Down Expand Up @@ -1717,20 +1708,19 @@
9BD519D71C4245A900F57EED /* YYImage.m in Sources */,
9BD519B41C4245A900F57EED /* NSNotificationCenter+YYAdd.m in Sources */,
9BD519BC1C4245A900F57EED /* CALayer+YYAdd.m in Sources */,

9B8874081C5A00B6009CC1D2 /* TWModel.swift in Sources */,


9BD519FA1C4245A900F57EED /* YYThreadSafeArray.m in Sources */,
9B66C7571C2939F500F4CB66 /* MCWebImageExampleCell.swift in Sources */,
9BD519E31C4245A900F57EED /* YYTextKeyboardManager.m in Sources */,
9BD766B71C47A17E004BD56C /* UIButton+WebCache.m in Sources */,
9BD519B31C4245A900F57EED /* NSKeyedUnarchiver+YYAdd.m in Sources */,
9BD519CA1C4245A900F57EED /* UITextField+YYAdd.m in Sources */,
9B58996A1C5C87C90096FAC6 /* TWStatusView.swift in Sources */,
9BD519B11C4245A900F57EED /* NSDate+YYAdd.m in Sources */,
9BD519DD1C4245A900F57EED /* NSObject+YYModel.m in Sources */,
9BD331F01C1AD406008C9557 /* MCServerBasicResult.swift in Sources */,
9B8874061C59F415009CC1D2 /* TWHelper.swift in Sources */,
9B5899681C5C803A0096FAC6 /* TWeetCell.swift in Sources */,
9BD519B71C4245A900F57EED /* NSObject+YYAddForARC.m in Sources */,
9B1BBD3F1C40EA5B007CD602 /* WBStatusTitleView.swift in Sources */,
9BD766BB1C47A17E004BD56C /* UIImageView+HighlightedWebCache.m in Sources */,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,4 @@
<Bucket
type = "1"
version = "2.0">
<<<<<<< HEAD
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "weibo-swift/Feed List/Twitter/T1HomeTimelineItemsViewController.swift"
timestampString = "475742029.275381"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "71"
endingLineNumber = "71"
landmarkName = "viewDidLoad()"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
=======
>>>>>>> 2a93f825f29d35ea807abbc0bae63c3ef40d5b98
</Bucket>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class T1HomeTimelineItemsViewController: UIViewController,UITableViewDelegate,UI

var fpsLabel :MCFPSLabel!
var tableView :UITableView!
let layouts :NSMutableArray = NSMutableArray()
var layouts :NSMutableArray = NSMutableArray()


override func viewWillAppear(animated: Bool) {
Expand Down Expand Up @@ -73,13 +73,42 @@ class T1HomeTimelineItemsViewController: UIViewController,UITableViewDelegate,UI
let layout: TWLayout = TWLayout()
layout.tweet = tweet
layouts.addObject(layout)
}else if item.isKindOfClass(TWConversation.self){

let conv = item as! TWConversation
let convLayouts = NSMutableArray()

for tw in conv.tweets! as! [TWTweet] {

let la = TWLayout()
la.conversation = conv
la.tweet = tw
convLayouts.addObject(la)
}

if conv.targetCount != nil && Float(conv.targetCount!) > 0 && convLayouts.count >= 2 {
let laa = TWLayout()
laa.conversation = conv
laa .layout()
convLayouts.insertObject(laa, atIndex: 1)
}
layouts.addObjectsFromArray(convLayouts as [AnyObject])
}
}
}

dispatch_async(dispatch_get_main_queue(), { () -> Void in

self.title = "Tweet (loaded:\(layouts.count))"
indicator.removeFromSuperview()
self.navigationController?.view.userInteractionEnabled = true
self.layouts = layouts
self.tableView.reloadData()
})

}

print(layouts)

}


Expand Down Expand Up @@ -115,21 +144,25 @@ class T1HomeTimelineItemsViewController: UIViewController,UITableViewDelegate,UI
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

let cell = UITableViewCell()
cell.textLabel?.text = "dddd"
return cell
let cellId = "twcell"
var cell :TWeetCell? = tableView.dequeueReusableCellWithIdentifier(cellId) as? TWeetCell
if cell == nil {
cell = TWeetCell(style: UITableViewCellStyle.Default, reuseIdentifier: cellId)
// cell?.delegate = self
}
return cell!
}
func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {

if self.layouts.count > 0 {
let layout = self.layouts[indexPath.row] as! WBStatusLayout
(cell as! WBStatusCell).setWithLayout(layout)
let layout = self.layouts[indexPath.row] as! TWLayout
(cell as! TWeetCell).bindLayout(layout)
}
}
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
if self.layouts.count > 0 {
let layout = self.layouts[indexPath.row] as! WBStatusLayout
return CGFloat(layout.height!)
let layout = self.layouts[indexPath.row] as! TWLayout
return layout.height
}else {
return 0
}
Expand Down
Loading

0 comments on commit 6a9adba

Please sign in to comment.