Skip to content

Commit 5d6e140

Browse files
committed
Part 1
1 parent f793148 commit 5d6e140

File tree

4 files changed

+195
-4
lines changed

4 files changed

+195
-4
lines changed

.gitignore

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
#########################
2+
# .gitignore file for Xcode4 and Xcode5 Source projects
3+
#
4+
# Apple bugs, waiting for Apple to fix/respond:
5+
#
6+
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
7+
#
8+
# Version 2.1
9+
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
10+
#
11+
# 2013 updates:
12+
# - fixed the broken "save personal Schemes"
13+
# - added line-by-line explanations for EVERYTHING (some were missing)
14+
#
15+
# NB: if you are storing "built" products, this WILL NOT WORK,
16+
# and you should use a different .gitignore (or none at all)
17+
# This file is for SOURCE projects, where there are many extra
18+
# files that we want to exclude
19+
#
20+
#########################
21+
22+
#####
23+
# OS X temporary files that should never be committed
24+
#
25+
# c.f. http://www.westwind.com/reference/os-x/invisibles.html
26+
27+
.DS_Store
28+
29+
# c.f. http://www.westwind.com/reference/os-x/invisibles.html
30+
31+
.Trashes
32+
33+
# c.f. http://www.westwind.com/reference/os-x/invisibles.html
34+
35+
*.swp
36+
37+
# *.lock - this is used and abused by many editors for many different things.
38+
# For the main ones I use (e.g. Eclipse), it should be excluded
39+
# from source-control, but YMMV
40+
41+
*.lock
42+
43+
#
44+
# profile - REMOVED temporarily (on double-checking, this seems incorrect; I can't find it in OS X docs?)
45+
#profile
46+
47+
48+
####
49+
# Xcode temporary files that should never be committed
50+
#
51+
# NB: NIB/XIB files still exist even on Storyboard projects, so we want this...
52+
53+
*~.nib
54+
55+
56+
####
57+
# Xcode build files -
58+
#
59+
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData"
60+
61+
DerivedData/
62+
63+
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build"
64+
65+
build/
66+
67+
68+
#####
69+
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
70+
#
71+
# This is complicated:
72+
#
73+
# SOMETIMES you need to put this file in version control.
74+
# Apple designed it poorly - if you use "custom executables", they are
75+
# saved in this file.
76+
# 99% of projects do NOT use those, so they do NOT want to version control this file.
77+
# ..but if you're in the 1%, comment out the line "*.pbxuser"
78+
79+
# .pbxuser: http://lists.apple.com/archives/xcode-users/2004/Jan/msg00193.html
80+
81+
*.pbxuser
82+
83+
# .mode1v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html
84+
85+
*.mode1v3
86+
87+
# .mode2v3: http://lists.apple.com/archives/xcode-users/2007/Oct/msg00465.html
88+
89+
*.mode2v3
90+
91+
# .perspectivev3: http://stackoverflow.com/questions/5223297/xcode-projects-what-is-a-perspectivev3-file
92+
93+
*.perspectivev3
94+
95+
# NB: also, whitelist the default ones, some projects need to use these
96+
!default.pbxuser
97+
!default.mode1v3
98+
!default.mode2v3
99+
!default.perspectivev3
100+
101+
102+
####
103+
# Xcode 4 - semi-personal settings
104+
#
105+
#
106+
# OPTION 1: ---------------------------------
107+
# throw away ALL personal settings (including custom schemes!
108+
# - unless they are "shared")
109+
#
110+
# NB: this is exclusive with OPTION 2 below
111+
xcuserdata
112+
113+
# OPTION 2: ---------------------------------
114+
# get rid of ALL personal settings, but KEEP SOME OF THEM
115+
# - NB: you must manually uncomment the bits you want to keep
116+
#
117+
# NB: this *requires* git v1.8.2 or above; you may need to upgrade to latest OS X,
118+
# or manually install git over the top of the OS X version
119+
# NB: this is exclusive with OPTION 1 above
120+
#
121+
#xcuserdata/**/*
122+
123+
# (requires option 2 above): Personal Schemes
124+
#
125+
#!xcuserdata/**/xcschemes/*
126+
127+
####
128+
# XCode 4 workspaces - more detailed
129+
#
130+
# Workspaces are important! They are a core feature of Xcode - don't exclude them :)
131+
#
132+
# Workspace layout is quite spammy. For reference:
133+
#
134+
# /(root)/
135+
# /(project-name).xcodeproj/
136+
# project.pbxproj
137+
# /project.xcworkspace/
138+
# contents.xcworkspacedata
139+
# /xcuserdata/
140+
# /(your name)/xcuserdatad/
141+
# UserInterfaceState.xcuserstate
142+
# /xcsshareddata/
143+
# /xcschemes/
144+
# (shared scheme name).xcscheme
145+
# /xcuserdata/
146+
# /(your name)/xcuserdatad/
147+
# (private scheme).xcscheme
148+
# xcschememanagement.plist
149+
#
150+
#
151+
152+
####
153+
# Xcode 4 - Deprecated classes
154+
#
155+
# Allegedly, if you manually "deprecate" your classes, they get moved here.
156+
#
157+
# We're using source-control, so this is a "feature" that we do not want!
158+
159+
*.moved-aside
160+
161+
####
162+
# Xcode 5 - VCS file
163+
# The data in this file not represent state of your project.
164+
# If you'll leave this file in git - you will have merge conflicts during
165+
# pull your cahnges to other's repo
166+
#
167+
*.xccheckout
168+
169+
####
170+
# UNKNOWN: recommended by others, but I can't discover what these files are
171+
#
172+
# ...none. Everything is now explained.

MusicPlayer/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1515

1616

1717
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18-
// Override point for customization after application launch.
18+
println("Hello World!")
1919
return true
2020
}
2121

MusicPlayer/Base.lproj/Main.storyboard

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
55
</dependencies>
66
<scenes>
77
<!--View Controller-->
88
<scene sceneID="ufC-wZ-h7g">
99
<objects>
10-
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
10+
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="MusicPlayer" customModuleProvider="target" sceneMemberID="viewController">
1111
<layoutGuides>
1212
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
1313
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
1414
</layoutGuides>
1515
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
1616
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
1717
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
18+
<subviews>
19+
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="ODz-Kv-YZf">
20+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
21+
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
22+
</tableView>
23+
</subviews>
1824
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
1925
</view>
2026
</viewController>

MusicPlayer/ViewController.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ class ViewController: UIViewController {
1919
super.didReceiveMemoryWarning()
2020
// Dispose of any resources that can be recreated.
2121
}
22+
23+
24+
func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int {
25+
return 10
26+
}
27+
func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
28+
let cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Subtitle, reuseIdentifier: "MyTestCell")
29+
30+
cell.textLabel?.text = "Row #\(indexPath.row)"
31+
cell.detailTextLabel?.text = "Subtitle #\(indexPath.row)"
32+
33+
return cell
34+
}
2235

2336

2437
}

0 commit comments

Comments
 (0)