« Home « Chủ đề thủ thuật lập trình iphone

Chủ đề : thủ thuật lập trình iphone


Có 60+ tài liệu thuộc chủ đề "thủ thuật lập trình iphone"

Lập trình iphone chuyên nghiệp part 10

tailieu.vn

The unique platform capabilities of iPhone and iPod touch enable developers to create innovative applications inside of Mobile Safari that go beyond the normal “Web app” fare. Mobile Safari’s support for the canvas element opens drawing and animation capabilities in an ordinary HTML page that was previously available only by using Flash or Java. However, once you begin to open...

Lập trình iphone chuyên nghiệp part 11

tailieu.vn

The image can reference either an external image or another canvas element on the page. The first variant simply draws an image at the specified coordinates using the size of the image:. context.drawImage(image, x, y). The second method enables you to specify the dimensions of the image with the w and h arguments:. context.drawImage(image, x, y, width, height). To do...

Lập trình iphone chuyên nghiệp part 12

tailieu.vn

You can use an external image to create an image pattern on the back of a canvas element using the createPattern() method. patternObject = context.createPattern(image, type). The type argument is one of the familiar CSS pattern types: repeat , repeat-x , repeat-y , and no-repeat . var pat = context.createPattern(pImg,’repeat’);. context.fillStyle = pat;. context.fillRect . Therefore, you place the rest...

Lập trình iphone chuyên nghiệp part 13

tailieu.vn

“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>. <html xmlns=”http://www.w3.org/1999/xhtml”>. user-scalable=0;”/>. <style type=”text/css” media=”screen”>@import “../iui/iui.css”;</style>. <style type=”text/css” media=”screen”>@import “../iui/cui.css”;</style>. <script type=”application/x-javascript” src=”../iui/iui.js”></script>. <div class=”toolbar”>. <h1 id=”pageTitle”></h1>. <a id=”backButton” class=”button” href=”#”></a>. <a class=”button” href=”#searchForm”>Search</a>. <ul id=”home” title=”iProspector” selected=”true”>. <li><a href=”#leads”>Sales Leads</a></li>. <li><a href=”#customers”>Customers</a></li>. <li><a href=”#orders”>Order Fulfillment</a></li>. <li><a href=”#settings”>Settings</a></li>. <li><a href=”#about”>About</a></li>. <ul id=”leads” title=”Sales Leads”>. <li class=”group”>A</li>. <li><a href=”#Jack_Armitage”>Jack Armitage</a></li>. <li><a href=”#Jason_Armstrong”>Jason Armstrong</a></li>. <li class=”group”>B</li>. <li><a href=”#Bob_Balancia”>Bob Balancia</a></li>. <li><a...

Lập trình iphone chuyên nghiệp part 14

tailieu.vn

<a href=”tel gt lt;/a>. c07.indd 159. <a href=”tel:+1-800-ASK-USPS;pp2”>USPS (Espanol)</a>. <meta name = “format-detection” content = “telephone=no”>. <p>Your ID is lt;/p>. <p>Your ID is <span>5083</span>212202.</p>. In adding this telephone link functionality into iProspector, you want to emulate the telephone links inside of the iPhone Contact UI. Inside of the div elements, add a label and a link.. Here’s the code:. <div...

Lập trình iphone chuyên nghiệp part 15

tailieu.vn

<a href=”http://maps.google.com/maps?q=Boston,+MA”>Boston</a>. <a href=”http://maps.google.com/maps?q=1000+Massachusetts+Ave,+Boston,+MA”>Jack Armitage’s Office</a>. c07.indd 167. <a href=”http://maps.google.com/maps?q=1000+Massachusetts+Ave,+Boston,+MA+(Jack +Armitage’s+Office)”>Jack Armitage’s Office</a>. <a href=”http://maps.google.com/maps?q=52.123N,2.456W”>Jack’s Summer Retreat</a>. c07.indd 168. <a href=”http://maps.google.com/maps?saddr=Holden+MA&daddr=1000+Massachusetts+Ave, +Boston,+MA”>Directions To Office</a>. c07.indd 169. <div class=”rowCuiAddressBox”>. <label class=”cui”>work</label>. <p class=”cui”>1520 Main Street</p>. <p class=”cui”>Boston, MA 01210</p>. c07.indd 170. label.cui rule:. label.cui { position: absolute;. <div class=”row”>. <a class=”cuiServiceButton” target=”_self”. href=”http://maps.google.com/maps?q=1000+Massachusetts+Ave,+Boston,+MA”>Map To Office</a>. href=”http://maps.google.com/maps?saddr=Holden+MA&daddr=1000+Massachusetts+Ave, +Boston,+MA”>Directions To Office</a>. Back over...

Lập trình iphone chuyên nghiệp part 16

tailieu.vn

Web Sites for iPhone and iPod touch. On the same day that I began writing a chapter on enabling Web sites for iPhone and iPod touch, I would realize firsthand the frustration of browsing sites that just don ’ t work with my iPhone. What ’ s happening in the game? Are the Titans still winning? I immediately pulled out...

Lập trình iphone chuyên nghiệp part 17

tailieu.vn

For a content block, you can specify the number of columns, width of the columns, and the gap between them. When Mobile Safari does support multicolumns, it can offer an easy way to transform existing content into the columnar structure that iPhone and iPod touch users love.. T ier 3: Custom iPhone/iPod touch Styles. An iPhone and iPod touch user...

Lập trình iphone chuyên nghiệp part 18

tailieu.vn

Unless you are creating an iPhone or iPod touch application, developing for Tier 2 or 3 support will provide sufficient support for most sites. However, you might find a compelling need to actually develop a site specifically written for iPhone/iPod touch. If you are going to offer an iPhone/iPod touch version of your site, you want to offer your users...

Lập trình iphone chuyên nghiệp part 19

tailieu.vn

They are far more concerned with saving milliseconds than they are about the read- ability of the code that they are optimizing. c09.indd 209. c09.indd PM PM. But at the same time, don ’ t go through complex optimization hoops unless you prove that your steps are going to make a substantive difference in the usability of your application. Therefore,...

Lập trình iphone chuyên nghiệp part 20

tailieu.vn

javascript:(function(){var%20a=document.getElementsByTagName(‘a’);for(var%20i=0,j=a .length;i%3Cj;i++){a[i].setAttribute(‘target’,’_blank’);var%20img=document.createEl ement(‘img’);img.setAttribute(‘class’,%20’new-. window’);img.setAttribute(‘src’,’data:image/gif;base64,’+’R0lGODlhEAAMALMLAL66tBISE jExMdTQyBoaGjs7OyUlJWZmZgAAAMzMzP///////wAAAAAAAAAAAAAA’+’ACH5BAEAAAsALAAAAAAQAAwAA AQ/cMlZqr2Tps13yVJBjOT4gYairqohCTDMsu4iHHgwr7UA/LqdopZS’+’DBBIpGG5lBQH0GgtU9xNJ9XZ1 cnsNicRADs=’);img.setAttribute(‘style’,’width:16px!important;height:12px!important;. border:none!important;’);a[i].appendChild(img);}})();. %3D0%2Cj%3Da.length%3Bi%3Cj%3Bi%2B%2B)%7Ba%5Bi%5D.setAttribute(‘target’%2C’_blank’). %3Bvar%20img%3Ddocument.createElement(‘img’)%3Bimg.setAttribute(‘class’%2C’new- window’)%3Bimg.setAttribute(‘src’%2C’data%3Aimage%2Fgif%3Bbase64%2C’%2B’R0lGODlhEAA MALMLAL66tBISEjExMdTQyBoaGjs7OyUlJWZmZgAAAMzMzP%2F%2F%2F%2F%2F%2F%2FwAAAAAAAAAAAAAA. ’%2B’ACH5BAEAAAsALAAAAAAQAAwAAAQ%2FcMlZqr2Tps13yVJBjOT4gYairqohCTDMsu4iHHgwr7UA%2FL qdopZS’%2B’DBBIpGG5lBQH0GgtU9xNJ9XZ1cnsNicRADs%3D’)%3Bimg.setAttribute(‘style’%2C’w idth%3A16px!important%3Bheight%3A12px!important%3Bborder%3Anone!important%3B’)%3Ba%. var a=document.getElementsByTagName(‘a’);. a[i].setAttribute(‘target’,’_blank’);. var img=document.createElement(‘img’);. img.setAttribute(‘class’,’new-window’);. img.setAttribute(‘src’,’data:image/gif;base64,’+’R0lGODlhEAAMALMLAL66tBISEjExMdTQy BoaGjs7OyUlJWZmZgAAAMzMzP///////wAAAAAAAAAAAAAA’+’ACH5BAEAAAsALAAAAAAQAAwAAAQ/cMlZq r2Tps13yVJBjOT4gYairqohCTDMsu4iHHgwr7UA/LqdopZS’+’DBBIpGG5lBQH0GgtU9xNJ9XZ1cnsNicRA Ds=’);. img.setAttribute(‘style’,’width:16px!important;. newDoc.open();. “<html><head><title>Source of. document.location.href

Lập trình iphone chuyên nghiệp part 21

tailieu.vn

Storing an Application in a Data URL. To be clear, data URLs store, not a simple link to a remote page, but the actual contents of the page. This data URL can then be saved as a bookmark. c10.indd 226. c10.indd PM PM. Constraints and Issues with Using Data URL s. You can store client-side technologies — such as HTML,...

Lập trình iphone chuyên nghiệp part 22

tailieu.vn

Perhaps its greatest limita- tion was only providing a single picture of the house on its listings page. Though there are limitations because of the Mobile Safari environment, you want to emulate the basic look of the built - in Photo application (see Figure 11 - 1 ) with its black background and toolbar and Next and Previous buttons. However,...

Lập trình iphone chuyên nghiệp part 23

tailieu.vn

Figure 11-3: Community sports Web site ready for iPhonification. and coaches of the sports league will have fingertip access to the league schedule, game results, league news, and the rule book — either at the games or else en route to them.. c11.indd 246. c11.indd PM PM. form a community sports Web site, as shown in Figure 11 - 3...

Lập trình iphone chuyên nghiệp part 24

tailieu.vn

That ’ s the attitude that most developers have in testing and debugging their applications. Many iPhone developers, unsure of where else to turn, end up resorting to alert() debugging — you know, adding alert() throughout the body of the script code to determine programmatic flow and variable values. You can click the right arrow to display a list of...

Lập trình iphone chuyên nghiệp part 25

tailieu.vn

If you recall from Chapter 1 , Safari is built on top of the open source WebKit browser engine. However, if you are running Mac OS X, you can download the latest nightly build of WebKit at www.webkit.org and take advantage of using Drosera. c12.indd 268. c12.indd PM PM. The Drosera debugger is shown in Figure 12 - 6. Figure...

Phát triển ứng dụng cho iPhone và iPad - part 1

tailieu.vn

IPHONE® AND IPAD™ DATABASE APPLICATION PROGRAMMING. PART I MANIPULATING AND DISPLAYING DATA ON THE IPHONE AND IPAD CHAPTER 1 Introducing Data-Driven Applications. CHAPTER 2 The iPhone and iPad Database: SQLite. CHAPTER 3 Displaying Your Data: The UITableView. PART II MANAGING YOUR DATA WITH CORE DATA CHAPTER 5 Introducing Core Data. CHAPTER 7 Building a Core Data Application. CHAPTER 8 Core...

Phát triển ứng dụng cho iPhone và iPad - part 2

tailieu.vn

ffirs.indd ix. ffirs.indd ix PM PM. ffirs.indd x. ffirs.indd x PM PM. ffirs.indd xi. ffirs.indd xi PM PM. ffirs.indd xii. ffirs.indd xii PM PM. ffirs.indd xiii. ffirs.indd xiii PM PM. ffirs.indd xiv. ffirs.indd xiv PM PM. Moving Forward 18. SQLite and Core Data 20. TOC.indd xv. TOC.indd xv PM PM. Moving Forward 55. Moving Forward 88. Displaying Master/Detail Data with...

Phát triển ứng dụng cho iPhone và iPad - part 3

tailieu.vn

Safely Threading with Core Data 246. Threading and Core Data 247. Core Data Threading Example 249. Core Data Performance 257. The Core Data Instruments 267. TOC.indd xix. TOC.indd xix PM PM. CHAPTER 10: WORKING WITH XML ON THE IPHONE 271. XML and the iPhone SDK 282. TOC.indd xx. TOC.indd xx PM PM. TOC.indd xxi. TOC.indd xxi PM PM. Flast.indd xxii....

Phát triển ứng dụng cho iPhone và iPad - part 4

tailieu.vn

Flast.indd xxix. Flast.indd xxix PM PM. Flast.indd xxx. Flast.indd xxx PM PM. Manipulating and Displaying Data on the iPhone and iPad. CH001.indd 1. CH001.indd AM AM. CH001.indd 2. Introducing Data - Driven Applications. WHAT ’ S IN THIS CHAPTER?. Neatly displaying your data in a table using the UITableView control. One of the most exciting things about the iPhone is...