ios keyboard return next text field swift

Use: UITextField.connectFields([userNameSignUp,emailSignUp,passwordSignUp,returnPaswordSignUp])
extension UITextField {
class func connectFields(fields:[UITextField]) -> Void {
guard let last = fields.last else {
return
}
for i in 0 ..< fields.count - 1 {
fields[i].returnKeyType = .Next
fields[i].addTarget(fields[i+1], action: #selector(UIResponder.becomeFirstResponder), forControlEvents: .EditingDidEndOnExit)
}
last.returnKeyType = .Done

ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle

ERROR ITMS-90635: "Invalid Mach-O Format. The Mach-O in bundle "xxx.app/Frameworks/xxx.framework" isn’t consistent with the Mach-O in the main bundle. The main bundle Mach-O contains armv7(machine code) and arm64(machine code), while the nested bundle Mach-O contains armv7(bitcode) and arm64(bitcode). Verify that all of the targets for a platform have a consistent value for the ENABLE_BITCODE build setting."

SearchController ios9

self.resultSearchController = ({
let controller = UISearchController(searchResultsController: nil)
controller.searchResultsUpdater = self
controller.dimsBackgroundDuringPresentation = false
controller.searchBar.delegate = self
presentViewController(controller, animated:false, completion:{

AudioServices

set RootViewController

let mainStoryBoard : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let mainPage : KYDrawerController = mainStoryBoard.instantiateViewControllerWithIdentifier(SEGUE_CONTAINER) as! KYDrawerController
let mainPageNav = UINavigationController(rootViewController: mainPage)
app?.window?.rootViewController = mainPageNav

switchRootViewController

func switchRootViewController(rootViewController: UIViewController, animated: Bool, completion: (() -> Void)?) {
if animated {
UIView.transitionWithView(window, duration: 0.5, options: .TransitionCrossDissolve, animations: {
let oldState: Bool = UIView.areAnimationsEnabled()
UIView.setAnimationsEnabled(false)
self.window!.rootViewController = rootViewController
UIView.setAnimationsEnabled(oldState)
}, completion: { (finished: Bool) -> () in

change Color footer TableView

override func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let footerView = UIView(frame: CGRectMake(0, 0, tableView.bounds.size.width, 60))
footerView.backgroundColor = UIColor.clearColor()
return footerView
}

Git need remind

Create the branch on your local machine and switch in this branch :

$ git checkout -b [name_of_your_new_branch]
Push the branch on github :

$ git push origin [name_of_your_new_branch]
When you want to commit something in your branch, be sure to be in your branch.

You can see all branches created by using :

$ git branch
Which will show :

* approval_messages
master
master_clean
Add a new remote for your branch :

$ git remote add [name_of_your_remote]
Push changes from your commit into your branch :

UITableView Cell selected Color?

let bgColorView = UIView()
bgColorView.backgroundColor = UIColor.redColor()
cell.selectedBackgroundView = bgColorView

Callback in Alamofire

import Foundation
import Alamofire

public class DataConnectionManager {

public class func getJSON(AppModule:String, callback:(Int) -> Void) -> Void {

switch(AppModule) {

Pages

Subscribe to Trần Mạnh Hoàng RSS