iphone sdk 文档包含示例代码的链接,但您必须从网络上单独下载它们。有没有可以从苹果一次性下载的捆绑包?
例如,阅读第一个 iPhone 教程 http://www.switchonthecode.com/tutorials/an-absolute-beginners-guide-to-iphone-development在 switchonthecode 上,我遇到的第一个新词是UI应用程序 http://developer.apple.com/iPhone/library/documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html。网上有5个示例...
我也是一个初学者,发现他们没有“所有示例”拉链很烦人。它们也不容易自动下拉它们,因为它们使用 javascript 来填充示例列表。
幸运的是,我能够使用 Chrome 检查示例页面并为我提供有效的“最终结果”HTML,并使用它来创建此脚本,该脚本将下载并解压所有示例。
希望我们作为一个社区能够维护这个列表,但截至今天它确实包含了所有示例。
ios-examples.sh
#!/bin/bash
while read n; do
wget "http://developer.apple.com/library/ios/samplecode/$n/$n.zip" &&
unzip "$n.zip" &&
rm "$n.zip"
done <<EOF
AQOfflineRenderTest
AccelerometerGraph
Accessory
AddMusic
AdvancedTableViewCells
AdvancedURLConnections
AlternateViews
AppPrefs
BatteryStatus
BonjourWeb
Breadcrumb
BubbleLevel
CopyPasteTile
CoreDataBooks
CryptoExercise
CurrentAddress
DateCell
DateSectionTitles
DocInteraction
DrillDownSave
EADemo
FastEnumerationSample
Formulaic
GKRocket
GKTank
GKTapper
GLES2Sample
GLGravity
GLImageProcessing
GLPaint
GLSprite
GLTextureAtlas
GenericKeychain
HazardMap
HeaderFooter
HeadsUpUI
HelloWorld_iPhone
Icons
InternationalMountains
KMLViewer
KeyboardAccessory
LaunchMe
LazyTableImages
ListAdder
LocateMe
Locations
MailComposer
MapCallouts
MessageComposer
Metronome
MixerHost
MoveMe
MoviePlayer_iPhone
MultipleDetailViews
MusicCube
NavBar
PVRTextureLoader
PageControl
PhotoLocations
PhotoPicker
Popovers
PrintPhoto
PrintWebView
QuartzDemo
QuickContacts
Reachability
Reflection
Scrolling
SeismicXML
SimpleDrillDown
SimpleEKDemo
SimpleFTPSample
SimpleGestureRecognizers
SimpleNetworkStreams
SimpleURLConnections
SimpleUndo
SpeakHere
SysSound
TableSearch
TableViewSuite
TableViewUpdates
TaggedLocations
Teslameter
TheElements
ToolbarSearch
TopPaid
TopSongs
TouchCells
Touches
Trailers
TransWeb
UICatalog
URLCache
ViewTransitions
WeatherMap
WhichWayIsUp
WiTap
WorldCities
ZoomingPDFViewer
aurioTouch
avTouch
iAdSuite
iPhoneCoreDataRecipes
iPhoneExtAudioFileConvertTest
iPhoneMixerEQGraphTest
iPhoneMultichannelMixerTest
iPhoneUnitTests
oalTouch
EOF
在相关说明中,我发现ack http://betterthangrep.com/是比 find/grep 更好的搜索示例的方法
希望这对其他人有帮助,就像对我有帮助一样。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)