Skip to content

Commit 5a1b7f3

Browse files
author
dzenbot
committed
Adds 500px example for the 'Applications' same
1 parent 8f4f52c commit 5a1b7f3

17 files changed

Lines changed: 103 additions & 11 deletions

DZNEmptyDataSet.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "DZNEmptyDataSet"
3-
s.version = "1.3.2"
3+
s.version = "1.3.3"
44
s.summary = "A drop-in UITableView/UICollectionView superclass category for showing empty datasets whenever the view has no content to display."
55
s.description = "It will work automatically, by just conforming to DZNEmptyDataSetSource, and returning the data you want to show. The -reloadData call will be observed so the empty dataset will be configured whenever needed. It is (extremely) important to set the dataSetSource and dataSetDelegate to nil, whenever the view is going to be released. This class uses KVO under the hood, so it needs to remove the observer before dealocating the view."
66
s.homepage = "https://github.com/dzenbot/DZNEmptyDataSet"

Examples/Applications/Applications/Application.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import <Foundation/Foundation.h>
1010

1111
typedef NS_ENUM(NSUInteger, ApplicationType) {
12+
ApplicationType500px,
1213
ApplicationTypeAirbnb,
1314
ApplicationTypeAppstore,
1415
ApplicationTypeCamera,

Examples/Applications/Applications/Application.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ - (void)setDisplayName:(NSString *)displayName
3636
ApplicationType applicationTypeFromString(NSString *string)
3737
{
3838
NSArray *arr = @[
39+
@"500px",
3940
@"Airbnb",
4041
@"AppStore",
4142
@"Camera",

Examples/Applications/Applications/DetailViewController.m

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ - (void)configureNavigationBar
5858
UIStatusBarStyle barstyle = UIStatusBarStyleDefault;
5959

6060
switch (self.application.type) {
61+
case ApplicationType500px:
62+
{
63+
barColor = [UIColor colorWithHex:@"242424"];
64+
tintColor = [UIColor colorWithHex:@"d7d7d7"];
65+
barstyle = UIStatusBarStyleLightContent;
66+
break;
67+
}
6168
case ApplicationTypeAirbnb:
6269
{
6370
barColor = [UIColor colorWithHex:@"f8f8f8"];
@@ -211,6 +218,13 @@ - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView
211218
NSMutableDictionary *attributes = [NSMutableDictionary new];
212219

213220
switch (self.application.type) {
221+
case ApplicationType500px:
222+
{
223+
text = @"No Photos";
224+
font = [UIFont boldSystemFontOfSize:17.0];
225+
textColor = [UIColor colorWithHex:@"545454"];
226+
break;
227+
}
214228
case ApplicationTypeAirbnb:
215229
{
216230
text = @"No Messages";
@@ -360,6 +374,13 @@ - (NSAttributedString *)descriptionForEmptyDataSet:(UIScrollView *)scrollView
360374
paragraph.alignment = NSTextAlignmentCenter;
361375

362376
switch (self.application.type) {
377+
case ApplicationType500px:
378+
{
379+
text = @"Get started by uploading a\nphoto.";
380+
font = [UIFont boldSystemFontOfSize:15.0];
381+
textColor = [UIColor colorWithHex:@"545454"];
382+
break;
383+
}
363384
case ApplicationTypeAirbnb:
364385
{
365386
text = @"When you have messages, you’ll\nsee them here.";
@@ -621,6 +642,7 @@ - (UIImage *)buttonBackgroundImageForEmptyDataSet:(UIScrollView *)scrollView for
621642
- (UIColor *)backgroundColorForEmptyDataSet:(UIScrollView *)scrollView
622643
{
623644
switch (self.application.type) {
645+
case ApplicationType500px: return [UIColor blackColor];
624646
case ApplicationTypeAirbnb: return [UIColor whiteColor];
625647
case ApplicationTypeDropbox: return [UIColor colorWithHex:@"f0f3f5"];
626648
case ApplicationTypeFacebook: return [UIColor colorWithHex:@"eceef7"];
@@ -657,6 +679,7 @@ - (CGPoint)offsetForEmptyDataSet:(UIScrollView *)scrollView
657679
- (CGFloat)spaceHeightForEmptyDataSet:(UIScrollView *)scrollView
658680
{
659681
switch (self.application.type) {
682+
case ApplicationType500px: return 9.0;
660683
case ApplicationTypeAirbnb: return 24.0;
661684
case ApplicationTypeAppstore: return 34.0;
662685
case ApplicationTypeFacebook: return 30.0;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x",
6+
"filename" : "icon_500px.png"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x",
11+
"filename" : "icon_500px@2x.png"
12+
}
13+
],
14+
"info" : {
15+
"version" : 1,
16+
"author" : "xcode"
17+
}
18+
}
2.66 KB
Loading
3.51 KB
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x",
6+
"filename" : "logo_500px.png"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x",
11+
"filename" : "logo_500px@2x.png"
12+
}
13+
],
14+
"info" : {
15+
"version" : 1,
16+
"author" : "xcode"
17+
}
18+
}
2.47 KB
Loading
3.32 KB
Loading

0 commit comments

Comments
 (0)