Created
June 8, 2016 09:34
-
-
Save akimach/58093b437985caaf3c1e72e8cdc8fa93 to your computer and use it in GitHub Desktop.
セルの挿入
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| self.timer = NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: #selector(NotificationBoardViewController.timerUpdate(_:)), userInfo: nil, repeats: true) | |
| } | |
| func timerUpdate(timer: NSTimer) { | |
| data.append(String(counter)) | |
| let indexPath = NSIndexPath(forRow: counter, inSection: 0) | |
| newsTable.insertRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.Automatic) | |
| counter += 1 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment