Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

🔸 Swift Rewrite 🔸 #450

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6f17004
Adding initial Swift interfaces
dzenbot Jan 1, 2020
14c625d
Adding dummy project to test swift rewrite
dzenbot Jan 1, 2020
23c31d3
Implementing the initial swizzling
dzenbot Jan 1, 2020
3fe09af
progress
dzenbot Jan 1, 2020
a88edfc
Code simplification
dzenbot Jan 1, 2020
1776552
Add more APIs support. Obfuscating as much implementation from EmptyD…
dzenbot Jan 1, 2020
28da6d5
temp
dzenbot Jan 1, 2020
08ec32c
Fixing test bundle
dzenbot Jan 1, 2020
b4593c6
cleanup
dzenbot Jan 1, 2020
745d907
Adding basic unit tests
dzenbot Jan 2, 2020
478c8d2
Cleaning all warning from sample projects
dzenbot Jan 2, 2020
b45d824
Attempt to replace SnapKit with raw auto-layout implementation, with …
dzenbot Jan 2, 2020
87dce84
Simplifying applications sample code
dzenbot Jan 2, 2020
8117bc7
Adding gesture based tap
dzenbot Jan 2, 2020
01a51bf
Fixing more sample project warnings
dzenbot Jan 2, 2020
2a9d2a4
renaming
dzenbot Jan 2, 2020
24a1531
Fixing tests, again
dzenbot Jan 2, 2020
636ebd6
File re-structuring + podspec update to 2.0
dzenbot Jan 2, 2020
6d984b3
Fixing tests, again
dzenbot Jan 2, 2020
f16e5c6
Slowly replicating the Application sample's app using the new Swift f…
dzenbot Jan 7, 2020
754d7c0
Adding a weak reference wrapper + code cleanup
dzenbot Jan 19, 2020
4504cbf
Removes SnapKit from EmptyDataSet (#455)
Mar 2, 2020
5463d56
Adds early exit to `isEmpty` function and removes SnapKit from Bento …
Mar 2, 2020
b9e6ffc
Update Source/Swift/EmptyDataSetSource.swift
dzenbot Mar 24, 2020
2e5398b
Update Source/Swift/EmptyDataSet.swift
dzenbot Mar 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions DZNEmptyDataSet.podspec
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
@version = "1.8.1"
@version = '2.0'

Pod::Spec.new do |s|
s.name = "DZNEmptyDataSet"
s.version = @version
s.summary = "A drop-in UITableView/UICollectionView superclass category for showing empty datasets whenever the view has no content to display."
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."
s.homepage = "https://github.com/dzenbot/DZNEmptyDataSet"
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { "dzenbot" => "[email protected]" }
s.ios.deployment_target = '6.0'
s.tvos.deployment_target = '9.0'
s.source = { :git => "https://github.com/dzenbot/DZNEmptyDataSet.git", :tag => "v#{s.version}" }
s.source_files = 'Classes', 'Source/**/*.{h,m}'
s.requires_arc = true
s.framework = "UIKit"
s.name = 'DZNEmptyDataSet'
s.version = @version
s.summary = 'A drop-in UITableView/UICollectionView superclass extension for displaying placeholders for whenever the view has no content to display.'
s.homepage = 'https://github.com/dzenbot/DZNEmptyDataSet'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Ignacio Romero Zurbuchen' => '[email protected]' }

s.source = {
:git => 'https://github.com/dzenbot/DZNEmptyDataSet.git',
:tag => 'v#{s.version}',
:branch => 'master'
}

s.source_files = 'Source/*.{swift}'
s.preserve_paths = 'Source/*'
s.requires_arc = true
s.swift_versions = ['4.0', '5.0', '5.1']

s.ios.deployment_target = '11.0'
s.tvos.deployment_target = '11.0'

s.ios.frameworks = 'UIKit'
s.tvos.frameworks = 'UIKit'

end
1 change: 1 addition & 0 deletions DZNEmptyDataSet/Applications/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#import "AppDelegate.h"
#import "MainViewController.h"
#import "Applications-Swift.h"

@implementation AppDelegate

Expand Down
13 changes: 12 additions & 1 deletion DZNEmptyDataSet/Applications/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, ApplicationType) {

ApplicationTypeUndefined = 0,
Expand Down Expand Up @@ -46,8 +48,15 @@ typedef NS_ENUM(NSUInteger, ApplicationType) {
@interface Application : NSObject
@property (nonatomic, strong) NSString *displayName;
@property (nonatomic, strong) NSString *developerName;
@property (nonatomic, strong) NSString *identifier;
@property (nonatomic, strong) NSString *iconName;
@property (nonatomic, strong) NSString *barColor;
@property (nonatomic, strong) NSString *tintColor;
@property (nonatomic, strong) NSString *identifier;
@property (nonatomic, strong) NSString * _Nullable title;
@property (nonatomic, strong) NSString * _Nullable subtitle;
@property (nonatomic, strong) NSString * _Nullable button;
@property (nonatomic, strong) NSString * _Nullable backgroundColor;

@property (nonatomic) ApplicationType type;

- (instancetype)initWithDictionary:(NSDictionary *)dict;
Expand All @@ -56,3 +65,5 @@ typedef NS_ENUM(NSUInteger, ApplicationType) {
+ (NSArray *)applicationsFromJSON:(id)JSON;

@end

NS_ASSUME_NONNULL_END
6 changes: 6 additions & 0 deletions DZNEmptyDataSet/Applications/Application.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ - (instancetype)initWithDictionary:(NSDictionary *)dict
if (self) {
self.displayName = dict[@"display_name"];
self.developerName = dict[@"developer_name"];
self.barColor = dict[@"bar_color"];
self.tintColor = dict[@"tint_color"];
self.identifier = dict[@"identifier"];
self.title = dict[@"title"];
self.subtitle = dict[@"subtitle"];
self.button = dict[@"button"];
self.backgroundColor = dict[@"background_color"];
}
return self;
}
Expand Down
Loading