Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Cơ bản: Action, Outlet, Closure (Block) -> Callback
- UITableView (indexPath), Custom
- UIWebView
- AutoLayout
- Vòng đời UIViewController, AppDelegate
- super.viewWillAppear(animated)
- self.navigationController?.navigationBarHidden = false
- let notificationCenter = NSNotificationCenter.defaultCenter()
- notificationCenter.addObserver(self, selector: #selector(handleKeyboardWillShowNotification(_:)), name: UIKeyboardWillShowNotification, object: nil)
- notificationCenter.addObserver(self, selector: #selector(handleKeyboardWillHideNotification(_:)), name: UIKeyboardWillHideNotification, object: nil)
- profileSettingViewTable.reloadData()
- }
- override func viewDidDisappear(animated: Bool) {
- super.viewDidDisappear(animated)
- let notificationCenter = NSNotificationCenter.defaultCenter()
- notificationCenter.removeObserver(self, name: UIKeyboardWillShowNotification, object: nil)
- notificationCenter.removeObserver(self, name: UIKeyboardWillHideNotification, object: nil)
- }
- func handleKeyboardWillShowNotification(notification: NSNotification) {
- if let userInfo = notification.userInfo where isHandleWhenShowKeyboard == true {
- if let keyboard = userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue{
- let keyBoardRect = keyboard.CGRectValue()
- let heightKeyboard = keyBoardRect.size.height
- let heightScreen = UIScreen.mainScreen().bounds.height
- // ...
- }
- }
- }
- func handleKeyboardWillHideNotification(notification: NSNotification) {
- topTableViewConstraint.constant = 0
- }
- Thư viện hay sử dụng: AFNetworking (Alamofire), SDWebImage
- Project Example: https://github.com/framgia/fels_137/tree/develop
- https://viblo.asia/u/nguyen.van.thieub
- Quản lý bộ nhớ: http://laptrinhios.vn/quan-ly-bo-nho-trong-ios-memory-management/
- UIViewController Life Cycle https://i.stack.imgur.com/g19fw.png
- Application Life Cycle https://i.stack.imgur.com/URh6p.png
Advertisement
Add Comment
Please, Sign In to add comment