Program 1: Write a Program to Print Student Details using Classes & Objects
Step 1: Open Xcode Tool, Click on Create a new project Step 2: Choose a template for your new Project: Select iOS
Under Application Select SingleView App click on Next Step 3: Choose options for your new project
Product Name: iOSLabex1 Organisation Name: Jain Organisation Identifier: JGI Language: Swift
Check Option Include Unit Tests
Check Option UI Tests
Click on Next
Step 4: select the path where to save your project and Click on Create Button
Step 5: Go to Main.Storyboard Drag and Drop objects from Object’s Library (5 TextField’s & 1 Button) design User
Interface, Select the Object and use Attribute, Size & Connection Inspector’s.
19BTRCE014 – Akshaya
Step 6: In ViewController.swift (Implement code as below)
import UIKit
class ViewController: UIViewController {
@IBOutlet var t1:UITextField! @IBOutlet var t2:UITextField! @IBOutlet var t3:UITextField! @IBOutlet var t4:UITextField! @IBOutlet var t5:UITextField! @IBOutlet var b1:UIButton! override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view. }
@IBAction func b1Onclick(){ print ("Student Details are
:\(t1.text!)\n\(t2.text!)\n\(t3.text!)\n\(t4.text!)\n\(t5.text!)") }}
Step 7: Give the Connections for Objects & Methods In the Keyboard Press Command-S to save the Project & Command - R to run the Program, the output is
Web hosting means a digital space provided by organisation or company to host the data or other company. It provide the specific space according to the pricing to coustomer or consumer to user their services. The main leader in hosting industries in india . Top Web Hosting Company. 1. Hosting Raja 2. Miles web These two are india based comapny which provide the service's worldwide.
Comments
Post a Comment