Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone



Clound SSD Virtual Server

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad) - Part 2

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad) - Part 2 บทความนี้เป็นภาคต่อของ Storyboard และ Navigation Controller โดยจะยกตัวอย่างการสร้าง View ขึ้นมา 3 Level และการเชื่อมโยงระหว่าง View ด้วย Action Segue แบบ modal แบบง่าย ๆ

อ่านเพิ่มเติม


เพื่อความเข้าใจมากขึ้นควรอ่าน 2 บทความนี้ก่อน โดยบทความแรกจะเป็นพื้นฐานการใช้งาน Storyboard และการสร้าง View บน Storyboard ส่วนบทความที่ 2 เป็นการสร้าง Navigation Controller ให้กับ View

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

Storyboard and Navigation Controller in View

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)


หน้าจอ View เมื่อแสดงผลบน iPhone ซึ่งจะเห็นว่าตอนนี้เป็นหน้าจอเปล่า ๆ ไม่มี Navigation Controller เข้ามาควบคุม

เริ่มต้นการสร้าง Navigation Controller ให้กับ View บน Storyboard

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

ในการสร้าง Navigation Controller ให้กับ View แต่ล่ะตัว สามารถเลือกที่ Editor -> Embed In -> Navigation Controller

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

Navigation Controller ถูกสร้างขึ้นเรียบร้อย

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

ทดสอบการเปลี่ยน Title Bar

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

ทดสอบการรันละแสดงผล ซึ่งตอนนี้ทั้ง 3 View ใช้การเชื่อมโยง Action Segue แบบ model เฉพาะฉะนั้น View ที่ 2 และ 3 จะไม่มีการสร้าง Navigation Controller ให้อัตโนมัติ เราจะต้องสร้างขึ้นมาเอง

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

คลิกที่ View 2 เลือก Editor -> Embed In -> Navigation Controller และ View 3 ก็ทำเช่นเดียวกัน เมื่อสร้าง Navigation Controller ทั้ง 3 View เรียบร้อยแล้ว ก็จะได้ทั้งหมด 3 คู่ด้วยกัน

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

View 1

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

View 2

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

View 3


Screenshot

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

แสดงผล View 1

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

แสดงผล View 2

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

แสดงผล View 3

ทั้ง 3 View สามารถที่จะเชื่อมโยงกันไปมาระหว่าง View ได้ ด้วยการสร้าง Action Segue ซึ่งในตัวอย่างนี้จะใช้แบบ modal

เพิ่มเติม

iOS/iPhone Storyboard and Navigation Controller in View (iPhone, iPad)

ในการเชื่อมโยง View ด้วย Action Segue ของ modal จะต้องทำการลากและเชื่อมโยงกันระหว่าง Navigation Controller คือหมายถึงว่า ปกติการลากเส้นจาก Button ของ View ที่ 1 แทนที่จะลากไปยัง View 2 แต่จะต้องลากไปยัง Navigation Controller ของ View 2






   
Share

Property & Method (Others Related)

iOS/iPhone Navigation Controller (UINavigationController) - (iPhone, iPad)

ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท


ลองใช้ค้นหาข้อมูล


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2012-10-27 15:29:46 / 2012-10-30 15:13:23
  Download : No files
 Sponsored Links / Related

 
iOS/iPhone Collection View and Master Detail (Objective-C, iPhone, iPad)
Rating :

 
iOS/iPhone Page Control (UIPageControl) and ScrollView (UIScrollView) (iPhone, iPad)
Rating :

 
iOS/iPhone Hide Input Keyboard and Validate Text Field (Password, Number, URL, E-Mail, Phone Number)
Rating :

 
iOS/iPhone AD BannerView (iAd Framework)
Rating :

 
iOS/iPhone Table View Show Enable Edit / Delete Cell (Swipe To Delete) (UITableView)
Rating :

 
iOS/iPhone Search Data from Web Server (URL,Website)
Rating :

 
iOS/iPhone Edit Update Data on Web Server (URL,Website)
Rating :

 
iOS/iPhone Delete Remove Data on Web Server (URL,Website)
Rating :

 
iOS/iPhone Register Form and Send Data to Web Server (PHP & MySQL)
Rating :

 
iOS/iPhone Login Username and Password from Web Server (PHP & MySQL)
Rating :


ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 00
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่