WebViews UIWebView. Controller Architecture UITabBarController Controls the first view that the user sees The view controller class (and xib) that manages.

Slides:



Advertisements
Similar presentations
View-Based Application Development Lecture 1 1. Flows of Lecture 1 Before Lab Introduction to the Game to be developed in this workshop Comparison between.
Advertisements

TITLE Insert a title for your stretch book project by clicking in the Title placeholder and entering text. TITLE Insert a title for your stretch book project.
Mouse Tutorial for Win XP In this tutorial you will learn to: Move the mouse Click and double click Make selections Manage windows Use menus Click the.
Step-by-Step: Add a Graphical Hyperlink USE the Special Events Final presentation that is still open from the previous exercise. 1.Go to slide 4, and click.
Detecting Collisions CSE 391 Fall 2012 Tony Scarlatos.
Creating and Editing a Web Page Using Inline Styles
BCS Schoolwires by Brenda Luther. User Name and Employee Password.
Microsoft Office 2007 Microsoft Excel Collaboration Feature Using SharePoint and Excel Services.
Microsoft Word 2010 Lesson 1: Introduction to Word.
Chapter 1 Creating a Flyer
Web Content Management System Website Maintenance Demonstration Introduction to Macromedia Contribute Jamie Uprichard.
View Controllers (second part) Content taken from book: “iPhone SDK Development” by Bill Dudney and Chris Adamson.
PowerPoint Lesson 1 Microsoft PowerPoint Basics
Storyboards Managing multiple views. Overview Create a single view application Give the project a name and click “Use Storyboards” and “Use Automatic.
Creating FrontPage Tasks The task view allows you to add information about what you want to accomplish when creating your Web site.
Review of last session The Weebly Dashboard The Weebly Dashboard Controls your account and your sites Controls your account and your sites From here you.
Exploring the Basics of Windows 8
Internet. Internet is Is a Global network Computers connected together all over that world. Grew out of American military.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 9: Customize! Navigating with a Master/Detail.
Sprite Animation CSE 391 Fall 2012 Tony Scarlatos.
Xcode Presentation Tom Pletzke. Creating App from template Launch Xcode Select Tabbed Application.
Website Design CLA – Transportation. Defining a Site Select: Site – New - Site Click Next.
Xcode testing Using XCTest.
HTML, XHTML, and CSS Chapter 12 Creating and Using XML Documents.
Met Alert Tool (MAT). Introduction What is MAT? –Met Alert Tool (MAT) monitors and alerts the user to weather conditions exceeding thresholds (for example,
Connecting to USF Network for Web Site SSH Secure Shell is the FTP program you will use to download your http files onto the USF server. To get the SSH.
Another Method to Open WebSpace as a Web Folder Alternative Method for Creating Web Folder in WebSpace, Slide 1Copyright © 2004, Jim Schwab, University.
XP Modifying the Slide Master Click the View tab on the Ribbon, and then, in the Master Views group, click the Slide Master button Click the Slide Master.
Making a PowerPoint Slide By Ms. Wesley. Creating Your PowerPoint Slide Learn how to: – Open PowerPoint ………………………….…….………Slides 3, 4Open PowerPoint –
iOS components in Swift
Alice 2.0 Introductory Concepts and Techniques Project 1 Exploring Alice and Object-Oriented Programming.
Wimba Presenters Guide North Dakota University System 2009.
Quick guide on making PowerPoint slides  PowerPoint is a presentation program  A PowerPoint slideshow is a stack of slides being presented one after.
Macromedia Dreamweaver 8-- Illustrated Introductory 1 Macromedia Dreamweaver 8 Unit H Collecting Data with HTML Forms.
Tabbed Views UITabBarController. Controller Architecture UITabBarController Controls the first view that the user sees The view controller class (and.
Dreamweaver MX. 2 Overview of Templates n Forms enable you to collect data from ______. n A form contains ________ such as text fields, radio buttons,
Navigation in iPads splitViewController. Overview Create a Master-Detail application Switch Device Family to iPad Give the project a name and click “Use.
IOS with Swift Hello world app.
Version How to Use Packet Tracer MarinaMD.
Create a Web View App Step-by-Step. Step 1 Create a new project in XCode using the "Single View Application" option.
View Controllers Content taken from book: “iPhone SDK Development” by Bill Dudney and Chris Adamson.
Gestures UIGestureRecognizer.
Nav Controllers UINavigationController. Overview Nav Controller basics Like a tabview controller, a navViewController manages views A navigationViewController.
How can Microsoft PowerPoint 2007 help you share information?
HTML Concepts and Techniques Fifth Edition Chapter 4 Creating Tables in a Web Site.
HTML Concepts and Techniques Fifth Edition Chapter 3 Creating Web Pages with Links, Images, and Formatted Text.
Copyright 2007, EMC Paradigm Publishing Inc. INTERNET EXPLORER 7 BACKNEXTEND 1-1 LINKS TO OBJECTIVES Launching Internet Explorer Launching Internet Explorer.
Lecture 10 Using Interface Builder to create Mac Applications.
PowerPoint Project 1 Pages PPT PowerPoint Views Normal Slides Tab Outline Tab Slide Sorter Notes Page Slide Show.
WESS Safety Authority WESS Module SA-2 SA Functions Modify Existing User Accounts.
Home page Web page link 1 Web page link 2Web page link 3Web page link 4.
Creating and Editing a Web Page
Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza.
Microsoft Office 2008 for Mac – Illustrated Unit D: Getting Started with Safari.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Web and Multimedia Development Copyright © Genetic Computer School 2007WM LESSON OVERVIEW  Use of Tables  Creating Tables  Try It – 1  Creating.
Creating Web Pages with Links, Images, and Embedded Style Sheets
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Introduction to Apps Development for the iPhone and the Android OS
iOS - First Application Anatomy
Windows 10.
Mail Merge And Macros in MS WORD
MOCKUP, FLOW, AND API SERVICE
EEC-492/693/793 iPhone Application Development
Chapter 1 Editing a Photo
EEC-492/693/793 iPhone Application Development
CSC 581: Mobile App Development
CSC 581: Mobile App Development
Apple Xcode with Swift Demo
User guide for OneDrive
Presentation transcript:

WebViews UIWebView

Controller Architecture UITabBarController Controls the first view that the user sees The view controller class (and xib) that manages which view is currently being shown to the user A tab controller switches views based on which tab button is selected. Other controllers Every view in the application has it’s own viewController and own xib file Taps in the content area go to the viewController Taps on the tab bar go to the UITabBarController.

The app We will create a Tab bar view using Xcode Choose File->new->project Click on Tabbed Application then click next Name your project, choose iPhone and Swift. Choose a place to save the project. Do not create a local git repository. Run the project. There should be an app with two buttons and two views.

What did you get? Look at the file navigator: These are the controllers for the first tab (it’s the root controller) and the second tab This contains the two icons used in the tab bar There is one storyboard with the two views.

Creating the view Click on the Main.Storyboard To the second view, add two buttons, a text field and a web view. make the placeholder text for the filed to be “Enter a URL” set the keyboard type to be “URL” set the return key to be “go” Arrange as in the next slide

Creating the View

Connecting the web view Click on the webview and open the connections inspector. Drag from the goBack circle to the “Back” button. Choose “touch up inside” from the pop-up dialog Drag from the goForward circle to the “Forward” button. Shoose “touch up inside” from the pop-up dialog

Connecting the web view Now create an IBOutlet for the textView and the webView. …and connect them to the text field and web view

Default page Add the bold code to viewDidLoad override func viewDidLoad() { super.viewDidLoad() let url = NSURL(string: " let request = NSURLRequest(URL: url!) myWebView.loadRequest(request) } Creates an instance of a NSURL that contains a URL Creates a URL request object that can be sent to a web view. Causes the webview to load the request

loading URL from text field In theViewController.swift file add an func loadAddressURL() { if let requestURL = NSURL(string: “ + urlField.text) { let request = NSURLRequest(URL: requestURL) myWebView.loadRequest(request) } urlField.resignFirstResponder() } Creates an instance of a NSURL that contains a URL Creates a URL request object that can be sent to a web view. Causes the webview to load the request Makes the keyboard disappear

loading URL from text field Go to Main.Storyboard click on the text field open the connections inspector connect Did End on Exit to the IBAction you created on the previous slide. Run

Connecting the web view Finally, go to the storyboard and connect the did end on exit sent event to the method that you just created in the file’s owner.

Run Run the app; you now have a web browser! Note that when you enter a url you must enter the part also!

One last thing Go back to the nib and drag an activity indicator view onto your window. Control drag to create an IBOutlet for the activity indicator view. Add this line as the first line in the textFieldDoneEditing method: -(IBAction)textFieldDoneEditing:(id)sender{ [self.activityIndicator startAnimating];

Run Run the app again When you enter a URL the activity indicator should start rotating Notice that it does not stop. You have to make your view controller a delegate of the UIWebView and add the method – webViewDidFinishLoad: In this method you can stop the activity indicator from rotating: [self.activityIndicator stopAnimating];