Skip to content

Commit

Permalink
fix a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lovemo committed Mar 13, 2016
2 parents 927a467 + ebec446 commit efaa96f
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,27 +157,38 @@ class FourthViewManger2: NSObject, SMKViewMangerProtocolDelegate {
### UIViewController中部分代码实现
```swift
class FirstVC: UIViewController {

@IBOutlet weak var table: UITableView!

override func viewDidLoad() {
super.viewDidLoad()
setupTableView()
}

/**
/**
tableView的一些初始化工作
*/
func setupTableView() {

self.table.separatorStyle = .None
table.tableHander = SMKBaseTableViewManger.init(viewModel: BQViewModel(), cellIdentifiers: [MyCellIdentifier], didSelectBlock: { (_, _) -> Void in
table.separatorStyle = .None

// 下拉刷新
table.mj_header = MJRefreshNormalHeader { [weak self] () -> Void in
if let strongSelf = self {
strongSelf.viewModel.smk_viewModelWithGetDataSuccessHandler({ (array) -> () in
strongSelf.table.reloadData()
})
// 结束刷新
self!.table.mj_header.endRefreshing()
}
}
table.mj_header.automaticallyChangeAlpha = true

table.tableHander = SMKBaseTableViewManger(cellIdentifiers: [MyCellIdentifier], didSelectBlock: { (_, _) -> Void in
let vc = UIViewController.viewControllerWithStoryboardName("Main", vcIdentifier: "SecondVCID")
self.navigationController?.pushViewController(vc, animated: true)
})

viewModel.smk_viewModelWithGetDataSuccessHandler { (array) -> () in
self.table.tableHander .getItemsWithModelArray({ () -> [AnyObject] in
return array
}, completion: { () -> () in
self.table.reloadData()
})
}
}
}

```

Expand Down

0 comments on commit efaa96f

Please sign in to comment.