- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2041 Articles for Mobile Development
2K+ Views
Line break in a UILabel is used to change how the text appears on a label. Suppose a label has text more than two lines but by default the Line break in a UILabel is used to change how the text appears on a label. Suppose a label has text more than two lines but by default the label shows 1 line and wraps/ trims the text that’s more than the label size.This can be done in multiple ways. Three of them are mentioned below.On the storyboard add a label.Give top constraint, trailing and leading constraint.Method One − Editing with ... Read More
727 Views
Index path is generally a set of two values representing row and section of a table view. Index path can be created in objective C as well as Swift as both are native language of iOS Development.IndexPathForRow is a class method in iOS. To create a index path we need to be sure about the section and row we need to create. Below are the methods of creating an Indexpath.To create an IndexPath in objective C we can use.NSIndexPath *myIP = [NSIndexPath indexPathForRow: Int inSection:Int] ;ExampleNSIndexPath *myIP = [NSIndexPath indexPathForRow: 5 inSection: 2] ;To create an IndexPath in Swift we ... Read More
819 Views
To renew a distribution certificate on mac we’ll have to go through a series of steps mentioned below.Use spotlight to open keychain access on your macFrom keychain access menu select Certificate Assistant -> Request certificate from certificate Authority.Fill the information there like Name, email and choose “save to disk”.Click continue and save to your desired location. This will generate a .CSR file which we’ll need to upload to the developer portal while generating our certificate.Go to “developer.apple.com”, login to your account, select “Certificates, IDs & Profiles”.Go to certificates, select production and click on the “+” on the topSelect "App Store ... Read More
837 Views
To use the front camera in swift we first need to get a list of cameras available in the device we are using. In this article we’ll see how to get the list of devices and then check if the front camera is available or not. We’ll do it in a series of steps.Import AVFoundationCheck if the list of cameras existsFilter out the front camera if exists.guard let frontCamera = AVCaptureDevice.devices().filter({ $0.position == .front }) .first as? AVCaptureDevice else { fatalError("Front camera not found") }The devices() method of AVCapture returns the list of cameras available. From that ... Read More
957 Views
To load an image in table view cell we’ll go through a series of steps.Create a table view, table view cell and add an Image view to it.Assign a custom class to the cell we created.In the cell for row at method write the following lines of code.let cell = tblView.dequeueReusableCell(withIdentifier: "CustomCell") as! CustomCell return cellTo download the image we’ll create a function and embed that into an extension.func setImageFromUrl(ImageURL :String) { URLSession.shared.dataTask( with: NSURL(string:ImageURL)! as URL, completionHandler: { (data, response, error) -> Void in DispatchQueue.main.async { if let ... Read More
2K+ Views
GSON is java library, It is used to convert OBJECT to JSON and JSON to Object. Internally it going to work based on serialization and de- serialization.This example demonstrate about how to convert ArrayList to string using GSON library.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code in build.gradle.apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.example.andy.myapplication" minSdkVersion 15 targetSdkVersion 28 ... Read More
4K+ Views
Before getting into shared preference to store arraylist example , we should know what is shared preferences in android. Using share preference, we can store or retrieve values as key and value pair. There are five different methods are available in share preference as shown below −Edit() − It going to edit shared preference valuescommit() − it going to commit shared preference values in xml fileapply() − It going to commit back changes from editor to shared preference.remove(String key) − It going to remove key and vales from shared preference use key.Put() − It going to put key and values ... Read More
274 Views
Using share preference, we can store or retrieve values as key and value pair. There are five different methods are available in share preference as shown below −Edit() − It going to edit shared preference valuescommit() − it going to commit shared preference values in xml fileapply() − It going to commit back changes from editor to shared preference.remove(String key) − It going to remove key and vales from shared preference use key.Put() − It going to put key and values to shared preference xml.A sample example syntax of shared preference as shown below −final SharedPreferences sharedPreferences = getSharedPreferences("USER", MODE_PRIVATE);In ... Read More
135 Views
In this article we’ll learn about Corona, PhoneGap and Titanium, though all these technologies are different, the common thing between these is that they all are cross platform. i.e they can be used to write program once and then run that on multiple platforms like iPhones and android devices.Corona − Corona is a free and open source SDK (Software development kit), developed by corona Labs roughly 10 years ago in 2009. Corona is mainly for developing 2D mobile applications for most of the platforms including iOS, Android, Desktop/ Windows Applications. Corona is based on top of C++ and openGL to ... Read More
4K+ Views
To hide the back button on navigation bar we’ll have to either set the navigation button as nil and then hide it or hide it directly.Let’s create a project, add 2 view controller and Embed them in navigation controller. Let’s see how this project looks when run without any code to remove the navigation bar.This code set’s the navigation bar’s back button as hidden.self.navigationController?.navigationItem.hidesBackButton = trueThis code set’s the navigation bar’s back button as nilself.navigationItem.leftBarButtonItem = nil;A combination of these to approaches would be a better solution and works even if you have set a custom navigation bar.self.navigationItem.leftBarButtonItem = nil ... Read More
To Continue Learning Please Login
Login with Google