Skip to content

Commit 94b964b

Browse files
committed
Add SelfSize project
1 parent 800b749 commit 94b964b

File tree

15 files changed

+2930
-1
lines changed

15 files changed

+2930
-1
lines changed

README

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
See http://useyourloaf.com for details
55

6-
This README last updated: 12-May-2014
6+
This README last updated: 07-August-2014
77
=======================================================================
88

99
+ INDEX
@@ -20,6 +20,7 @@
2020
Refresh - Using a UIRefreshControl in a table view controller
2121
RemindMe - Scheduling local notifications with UILocaNotification
2222
Restorer - State Preservation and Restoration
23+
SelfSize - iOS 8 Self Sizing Table View Cells (Huckleberry updated)
2324
SpeakEasy - Text to speech synthesis
2425
StaticTable - Using a storyboard to implement static table views
2526
Stepper - Example use of UIStepper control

SelfSize/README

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
=======================================================================
2+
SelfSize - Self-sizing table view cells with varying row heights
3+
Version 1.0 07 August 2014 Initial version.
4+
=======================================================================
5+
6+
Example of using self-sizing table view cells and universal storyboards
7+
introduced in iOS 8. This is a reworking of the Huckleberry project removing
8+
code that is no longer required. The full details are in the following post:
9+
10+
http://useyourloaf.com/blog/2014/08/07/self-sizing-table-view-cells.html
11+
12+
The original post can also be found here:
13+
14+
http://useyourloaf.com/blog/2014/02/14/table-view-cells-with-varying-row-heights.html
15+
Lines changed: 306 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,306 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
5351AA8A19845210006179CA /* README in Resources */ = {isa = PBXBuildFile; fileRef = 5351AA8919845210006179CA /* README */; };
11+
53EDDFCA19819CC40064D44A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDDFC919819CC40064D44A /* main.m */; };
12+
53EDDFCD19819CC40064D44A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDDFCC19819CC40064D44A /* AppDelegate.m */; };
13+
53EDDFD319819CC40064D44A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53EDDFD119819CC40064D44A /* Main.storyboard */; };
14+
53EDDFD519819CC40064D44A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 53EDDFD419819CC40064D44A /* Images.xcassets */; };
15+
53EDDFEC19819D190064D44A /* UYLTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDDFEB19819D190064D44A /* UYLTableViewController.m */; };
16+
53EDDFF319819E1C0064D44A /* UYLTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDDFF219819E1C0064D44A /* UYLTextCell.m */; };
17+
53EDDFF519819FFC0064D44A /* SourceData.plist in Resources */ = {isa = PBXBuildFile; fileRef = 53EDDFF419819FFC0064D44A /* SourceData.plist */; };
18+
/* End PBXBuildFile section */
19+
20+
/* Begin PBXFileReference section */
21+
5351AA8919845210006179CA /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
22+
53EDDFC419819CC40064D44A /* SelfSize.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SelfSize.app; sourceTree = BUILT_PRODUCTS_DIR; };
23+
53EDDFC819819CC40064D44A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
24+
53EDDFC919819CC40064D44A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
25+
53EDDFCB19819CC40064D44A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
26+
53EDDFCC19819CC40064D44A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
27+
53EDDFD219819CC40064D44A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
28+
53EDDFD419819CC40064D44A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
29+
53EDDFEA19819D190064D44A /* UYLTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UYLTableViewController.h; sourceTree = "<group>"; };
30+
53EDDFEB19819D190064D44A /* UYLTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UYLTableViewController.m; sourceTree = "<group>"; };
31+
53EDDFF119819E1C0064D44A /* UYLTextCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UYLTextCell.h; sourceTree = "<group>"; };
32+
53EDDFF219819E1C0064D44A /* UYLTextCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UYLTextCell.m; sourceTree = "<group>"; };
33+
53EDDFF419819FFC0064D44A /* SourceData.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = SourceData.plist; sourceTree = "<group>"; };
34+
/* End PBXFileReference section */
35+
36+
/* Begin PBXFrameworksBuildPhase section */
37+
53EDDFC119819CC40064D44A /* Frameworks */ = {
38+
isa = PBXFrameworksBuildPhase;
39+
buildActionMask = 2147483647;
40+
files = (
41+
);
42+
runOnlyForDeploymentPostprocessing = 0;
43+
};
44+
/* End PBXFrameworksBuildPhase section */
45+
46+
/* Begin PBXGroup section */
47+
53EDDFBB19819CC40064D44A = {
48+
isa = PBXGroup;
49+
children = (
50+
5351AA8919845210006179CA /* README */,
51+
53EDDFC619819CC40064D44A /* SelfSize */,
52+
53EDDFC519819CC40064D44A /* Products */,
53+
);
54+
sourceTree = "<group>";
55+
};
56+
53EDDFC519819CC40064D44A /* Products */ = {
57+
isa = PBXGroup;
58+
children = (
59+
53EDDFC419819CC40064D44A /* SelfSize.app */,
60+
);
61+
name = Products;
62+
sourceTree = "<group>";
63+
};
64+
53EDDFC619819CC40064D44A /* SelfSize */ = {
65+
isa = PBXGroup;
66+
children = (
67+
53EDDFCB19819CC40064D44A /* AppDelegate.h */,
68+
53EDDFCC19819CC40064D44A /* AppDelegate.m */,
69+
53EDDFEA19819D190064D44A /* UYLTableViewController.h */,
70+
53EDDFEB19819D190064D44A /* UYLTableViewController.m */,
71+
53EDDFF119819E1C0064D44A /* UYLTextCell.h */,
72+
53EDDFF219819E1C0064D44A /* UYLTextCell.m */,
73+
53EDDFD119819CC40064D44A /* Main.storyboard */,
74+
53EDDFD419819CC40064D44A /* Images.xcassets */,
75+
53EDDFC719819CC40064D44A /* Supporting Files */,
76+
);
77+
path = SelfSize;
78+
sourceTree = "<group>";
79+
};
80+
53EDDFC719819CC40064D44A /* Supporting Files */ = {
81+
isa = PBXGroup;
82+
children = (
83+
53EDDFF419819FFC0064D44A /* SourceData.plist */,
84+
53EDDFC819819CC40064D44A /* Info.plist */,
85+
53EDDFC919819CC40064D44A /* main.m */,
86+
);
87+
name = "Supporting Files";
88+
sourceTree = "<group>";
89+
};
90+
/* End PBXGroup section */
91+
92+
/* Begin PBXNativeTarget section */
93+
53EDDFC319819CC40064D44A /* SelfSize */ = {
94+
isa = PBXNativeTarget;
95+
buildConfigurationList = 53EDDFE419819CC40064D44A /* Build configuration list for PBXNativeTarget "SelfSize" */;
96+
buildPhases = (
97+
53EDDFC019819CC40064D44A /* Sources */,
98+
53EDDFC119819CC40064D44A /* Frameworks */,
99+
53EDDFC219819CC40064D44A /* Resources */,
100+
);
101+
buildRules = (
102+
);
103+
dependencies = (
104+
);
105+
name = SelfSize;
106+
productName = SelfSize;
107+
productReference = 53EDDFC419819CC40064D44A /* SelfSize.app */;
108+
productType = "com.apple.product-type.application";
109+
};
110+
/* End PBXNativeTarget section */
111+
112+
/* Begin PBXProject section */
113+
53EDDFBC19819CC40064D44A /* Project object */ = {
114+
isa = PBXProject;
115+
attributes = {
116+
LastUpgradeCheck = 0600;
117+
ORGANIZATIONNAME = "Keith Harrison";
118+
TargetAttributes = {
119+
53EDDFC319819CC40064D44A = {
120+
CreatedOnToolsVersion = 6.0;
121+
};
122+
};
123+
};
124+
buildConfigurationList = 53EDDFBF19819CC40064D44A /* Build configuration list for PBXProject "SelfSize" */;
125+
compatibilityVersion = "Xcode 3.2";
126+
developmentRegion = English;
127+
hasScannedForEncodings = 0;
128+
knownRegions = (
129+
en,
130+
Base,
131+
);
132+
mainGroup = 53EDDFBB19819CC40064D44A;
133+
productRefGroup = 53EDDFC519819CC40064D44A /* Products */;
134+
projectDirPath = "";
135+
projectRoot = "";
136+
targets = (
137+
53EDDFC319819CC40064D44A /* SelfSize */,
138+
);
139+
};
140+
/* End PBXProject section */
141+
142+
/* Begin PBXResourcesBuildPhase section */
143+
53EDDFC219819CC40064D44A /* Resources */ = {
144+
isa = PBXResourcesBuildPhase;
145+
buildActionMask = 2147483647;
146+
files = (
147+
5351AA8A19845210006179CA /* README in Resources */,
148+
53EDDFD319819CC40064D44A /* Main.storyboard in Resources */,
149+
53EDDFD519819CC40064D44A /* Images.xcassets in Resources */,
150+
53EDDFF519819FFC0064D44A /* SourceData.plist in Resources */,
151+
);
152+
runOnlyForDeploymentPostprocessing = 0;
153+
};
154+
/* End PBXResourcesBuildPhase section */
155+
156+
/* Begin PBXSourcesBuildPhase section */
157+
53EDDFC019819CC40064D44A /* Sources */ = {
158+
isa = PBXSourcesBuildPhase;
159+
buildActionMask = 2147483647;
160+
files = (
161+
53EDDFCD19819CC40064D44A /* AppDelegate.m in Sources */,
162+
53EDDFF319819E1C0064D44A /* UYLTextCell.m in Sources */,
163+
53EDDFEC19819D190064D44A /* UYLTableViewController.m in Sources */,
164+
53EDDFCA19819CC40064D44A /* main.m in Sources */,
165+
);
166+
runOnlyForDeploymentPostprocessing = 0;
167+
};
168+
/* End PBXSourcesBuildPhase section */
169+
170+
/* Begin PBXVariantGroup section */
171+
53EDDFD119819CC40064D44A /* Main.storyboard */ = {
172+
isa = PBXVariantGroup;
173+
children = (
174+
53EDDFD219819CC40064D44A /* Base */,
175+
);
176+
name = Main.storyboard;
177+
sourceTree = "<group>";
178+
};
179+
/* End PBXVariantGroup section */
180+
181+
/* Begin XCBuildConfiguration section */
182+
53EDDFE219819CC40064D44A /* Debug */ = {
183+
isa = XCBuildConfiguration;
184+
buildSettings = {
185+
ALWAYS_SEARCH_USER_PATHS = NO;
186+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
187+
CLANG_CXX_LIBRARY = "libc++";
188+
CLANG_ENABLE_MODULES = YES;
189+
CLANG_ENABLE_OBJC_ARC = YES;
190+
CLANG_WARN_BOOL_CONVERSION = YES;
191+
CLANG_WARN_CONSTANT_CONVERSION = YES;
192+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
193+
CLANG_WARN_EMPTY_BODY = YES;
194+
CLANG_WARN_ENUM_CONVERSION = YES;
195+
CLANG_WARN_INT_CONVERSION = YES;
196+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
197+
CLANG_WARN_UNREACHABLE_CODE = YES;
198+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
199+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
200+
COPY_PHASE_STRIP = NO;
201+
ENABLE_STRICT_OBJC_MSGSEND = YES;
202+
GCC_C_LANGUAGE_STANDARD = gnu99;
203+
GCC_DYNAMIC_NO_PIC = NO;
204+
GCC_OPTIMIZATION_LEVEL = 0;
205+
GCC_PREPROCESSOR_DEFINITIONS = (
206+
"DEBUG=1",
207+
"$(inherited)",
208+
);
209+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
210+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
211+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
212+
GCC_WARN_UNDECLARED_SELECTOR = YES;
213+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
214+
GCC_WARN_UNUSED_FUNCTION = YES;
215+
GCC_WARN_UNUSED_VARIABLE = YES;
216+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
217+
MTL_ENABLE_DEBUG_INFO = YES;
218+
ONLY_ACTIVE_ARCH = YES;
219+
SDKROOT = iphoneos;
220+
TARGETED_DEVICE_FAMILY = "1,2";
221+
};
222+
name = Debug;
223+
};
224+
53EDDFE319819CC40064D44A /* Release */ = {
225+
isa = XCBuildConfiguration;
226+
buildSettings = {
227+
ALWAYS_SEARCH_USER_PATHS = NO;
228+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
229+
CLANG_CXX_LIBRARY = "libc++";
230+
CLANG_ENABLE_MODULES = YES;
231+
CLANG_ENABLE_OBJC_ARC = YES;
232+
CLANG_WARN_BOOL_CONVERSION = YES;
233+
CLANG_WARN_CONSTANT_CONVERSION = YES;
234+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
235+
CLANG_WARN_EMPTY_BODY = YES;
236+
CLANG_WARN_ENUM_CONVERSION = YES;
237+
CLANG_WARN_INT_CONVERSION = YES;
238+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
239+
CLANG_WARN_UNREACHABLE_CODE = YES;
240+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
241+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
242+
COPY_PHASE_STRIP = YES;
243+
ENABLE_NS_ASSERTIONS = NO;
244+
ENABLE_STRICT_OBJC_MSGSEND = YES;
245+
GCC_C_LANGUAGE_STANDARD = gnu99;
246+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
247+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
248+
GCC_WARN_UNDECLARED_SELECTOR = YES;
249+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
250+
GCC_WARN_UNUSED_FUNCTION = YES;
251+
GCC_WARN_UNUSED_VARIABLE = YES;
252+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
253+
MTL_ENABLE_DEBUG_INFO = NO;
254+
SDKROOT = iphoneos;
255+
TARGETED_DEVICE_FAMILY = "1,2";
256+
VALIDATE_PRODUCT = YES;
257+
};
258+
name = Release;
259+
};
260+
53EDDFE519819CC40064D44A /* Debug */ = {
261+
isa = XCBuildConfiguration;
262+
buildSettings = {
263+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
264+
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
265+
INFOPLIST_FILE = SelfSize/Info.plist;
266+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
267+
PRODUCT_NAME = "$(TARGET_NAME)";
268+
};
269+
name = Debug;
270+
};
271+
53EDDFE619819CC40064D44A /* Release */ = {
272+
isa = XCBuildConfiguration;
273+
buildSettings = {
274+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
275+
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
276+
INFOPLIST_FILE = SelfSize/Info.plist;
277+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
278+
PRODUCT_NAME = "$(TARGET_NAME)";
279+
};
280+
name = Release;
281+
};
282+
/* End XCBuildConfiguration section */
283+
284+
/* Begin XCConfigurationList section */
285+
53EDDFBF19819CC40064D44A /* Build configuration list for PBXProject "SelfSize" */ = {
286+
isa = XCConfigurationList;
287+
buildConfigurations = (
288+
53EDDFE219819CC40064D44A /* Debug */,
289+
53EDDFE319819CC40064D44A /* Release */,
290+
);
291+
defaultConfigurationIsVisible = 0;
292+
defaultConfigurationName = Release;
293+
};
294+
53EDDFE419819CC40064D44A /* Build configuration list for PBXNativeTarget "SelfSize" */ = {
295+
isa = XCConfigurationList;
296+
buildConfigurations = (
297+
53EDDFE519819CC40064D44A /* Debug */,
298+
53EDDFE619819CC40064D44A /* Release */,
299+
);
300+
defaultConfigurationIsVisible = 0;
301+
defaultConfigurationName = Release;
302+
};
303+
/* End XCConfigurationList section */
304+
};
305+
rootObject = 53EDDFBC19819CC40064D44A /* Project object */;
306+
}

SelfSize/SelfSize/AppDelegate.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//
2+
// AppDelegate.h
3+
// SelfSize
4+
//
5+
// Created by Keith Harrison http://useyourloaf.com
6+
// Copyright (c) 2014 Keith Harrison. All rights reserved.
7+
//
8+
// Redistribution and use in source and binary forms, with or without
9+
// modification, are permitted provided that the following conditions are met:
10+
//
11+
// 1. Redistributions of source code must retain the above copyright
12+
// notice, this list of conditions and the following disclaimer.
13+
//
14+
// 2. Redistributions in binary form must reproduce the above copyright
15+
// notice, this list of conditions and the following disclaimer in the
16+
// documentation and/or other materials provided with the distribution.
17+
//
18+
// 3. Neither the name of the copyright holder nor the names of its
19+
// contributors may be used to endorse or promote products derived from
20+
// this software without specific prior written permission.
21+
//
22+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25+
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
26+
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27+
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28+
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29+
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30+
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31+
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32+
// POSSIBILITY OF SUCH DAMAGE.
33+
34+
#import <UIKit/UIKit.h>
35+
36+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
37+
38+
@property (strong, nonatomic) UIWindow *window;
39+
40+
@end
41+

0 commit comments

Comments
 (0)