Posts

Navigate from one ViewController to other

How to navigate the ViewController from one page to another using NavigationController?         let  nextView = self .storyboard?.instantiateViewController(withIdentifier: "viewidentifier" ) as ! ViewController          self .navigationController?.pushViewController(nextView, animated: true ) The above code will navigate the data to another viewcontroller with navigation stack

CORDOVA Plugin Firebase

Firebase plugin configuration  $ sudo cordova plugin add cordova-plugin-firebase-realtime-database --save The above command will save the firebase plugin inside your project. After that go ahead to the google firebase console and create an app using your bundle identifier (Note:Bundle identifier must be matches otherwise the firebase notification will not works). $ sudo cordova build ios After that goto your project -> Target ->Info -> Url Types It will show additional url type properties. Then paste inside identifier - "REVERSED_CLIENT_ID" and URL schemes as "com.googleusercontent.apps. appidinthefirebaseportal "

CORDOVA Commands for Phongap

Here below are the commands in phonegap for step by step creation and execution of project. Install phone in the Mac: $ sudo npm install -g phonegap@latest It will show some set of command lines for installation. Create new project in Phonegap: $ sudo phonegap create mynewApp The above command will create myApp as an app name and proceed with that.If you want create an app with bundle identifier also the proceed with the below commands. $ sudo phonegap create mynewApp --id "org.companyname.mynewApp" --name "mynewApp" After that enter into the folder and then add the platforms $ cd mynewApp Add the platform: $  cordova platform add ios $ cordova platform add android The above commands are adding the platform in the cordova project Add the plugin $ sudo cordova plugin add pluginName For plugin name we can use the plugin to install and deploy the project Build the project: $  sudo cordova build ios The above command will build th...

How to use the objective c files inside the swift project?

Image
Hai friends , if you confused for using the objective c files already you had but you had developed the app with swift.Then don't worry, apple had already the setup for the migration. Just you can drag and drop the objective c files inside your swift project it says an alert to create a Bridging header.After that you must select the yes then it will create the bridging header. Then you have to open the bridging header file and import the .h files of your objective c files.Then you can clean your project and import the file inside of your swift view controller file. Then you can easily access the variables and functions inside of your swift file.

TableView error Assertion Failiure when try to load the data

Image
When you tried to display the array of values in tableView but you got the below error. Error: Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:] The first thing you have to check with your tableView.Because if you not connected the delegate and data source to the taableView then you got the above error. Also if you did not add the table view data source and table view delegate then the above error will come.So add the delegate and data source things like below. class  ViewController: UIViewController , UITableViewDataSource , UITableViewDelegate { } Data source and delegate methods are connected from ViewController to tableView like below. You must have to implement the required delegate methods inside the View Controller.

CoreData Class used twise Error iOS Swift

Image
When you created coreData and tried to run then if it displays error as "the class name of coreData model className used twice in folder and CoreData".Then try the following steps to solve the issue.Select your coreData model object.Select third option in the right side menu. In above submenu Class->codegen->select as Manual/None. Then rebuild the code.The error is resolved Now.

Keyboard with done button and text field will scroll based on the keyboard height iOS swift

Hai friends, I know you had tired for implementing text field delegate and implement the delegate method codes in all the pages.when you follow the code it's easy to hadle the return button, Done button and more. If you want the keyboard with done button.Also when the keyboard appears when a text field is editing the text field wants to show above the keyboard.Keyboard with the next and previous button.The above three scenarios are fulfilled by using the IQKeyboardManager. First, we want to install the cocoa pods in the system and integrate the IQ keyboard manager. import the IQKeyboard in the app delegate.        import IQKeyboardManagerSwift Inside app delegate adds the below code inside the didfinishlaunchingoptions function. In every text field or textView the keyboard will have done, next, prev buttons and also the when keyboard up then the text field will go up and show the editing.