Skip to content

Commit e8c6aa3

Browse files
committed
🤔WIP [ci skip]
1 parent 503b157 commit e8c6aa3

File tree

8 files changed

+250
-24
lines changed

8 files changed

+250
-24
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// RevealServer.h
3+
// RevealServer
4+
//
5+
// Created by Tony Arnold on 25/11/2015.
6+
// Copyright © 2015 Itty Bitty Apps, Pty Ltd. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
//! Project version number for RevealServer.
12+
FOUNDATION_EXPORT double RevealServerVersionNumber;
13+
14+
//! Project version string for RevealServer.
15+
FOUNDATION_EXPORT const unsigned char RevealServerVersionString[];
16+
17+
// In this header, you should import all the public headers of your framework using statements like #import <RevealServer/PublicHeader.h>
18+
19+

RevealServer.framework/Info.plist

790 Bytes
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
framework module RevealServer {
2+
umbrella header "RevealServer.h"
3+
4+
export *
5+
module * { export * }
6+
}
4.05 MB
Binary file not shown.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env bash
2+
set -o errexit
3+
set -o nounset
4+
5+
# Ensure that we have a valid OTHER_LDFLAGS environment variable
6+
OTHER_LDFLAGS=${OTHER_LDFLAGS:=""}
7+
8+
# Ensure that we have a valid REVEAL_SERVER_FILENAME environment variable
9+
REVEAL_SERVER_FILENAME=${REVEAL_SERVER_FILENAME:="RevealServer.framework"}
10+
11+
# Ensure that we have a valid REVEAL_SERVER_PATH environment variable
12+
REVEAL_SERVER_PATH=${REVEAL_SERVER_PATH:="${SRCROOT}/${REVEAL_SERVER_FILENAME}"}
13+
14+
# The path to copy the framework to
15+
app_frameworks_dir="${CODESIGNING_FOLDER_PATH}/Frameworks"
16+
17+
copy_library() {
18+
mkdir -p "$app_frameworks_dir"
19+
cp -vRf "$REVEAL_SERVER_PATH" "${app_frameworks_dir}/${REVEAL_SERVER_FILENAME}"
20+
}
21+
22+
codesign_library() {
23+
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" ]; then
24+
codesign -fs "${EXPANDED_CODE_SIGN_IDENTITY}" "${app_frameworks_dir}/${REVEAL_SERVER_FILENAME}"
25+
fi
26+
}
27+
28+
main() {
29+
if [[ $OTHER_LDFLAGS =~ "RevealServer" ]]; then
30+
if [ -e "$REVEAL_SERVER_PATH" ]; then
31+
copy_library
32+
codesign_library
33+
echo "${REVEAL_SERVER_FILENAME} is included in this build, and has been copied to $CODESIGNING_FOLDER_PATH"
34+
else
35+
echo "${REVEAL_SERVER_FILENAME} is not included in this build, as it could not be found at $REVEAL_SERVER_PATH"
36+
fi
37+
else
38+
echo "${REVEAL_SERVER_FILENAME} is not included in this build because RevealServer was not present in the OTHER_LDFLAGS environment variable."
39+
fi
40+
}
41+
42+
main
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>files</key>
6+
<dict>
7+
<key>Headers/RevealServer.h</key>
8+
<data>
9+
e2S6Vuf8iJXurblvYWL8e3IMO7E=
10+
</data>
11+
<key>Info.plist</key>
12+
<data>
13+
3yuCXIz4oBBkDOLogLf3z8EtWn0=
14+
</data>
15+
<key>Modules/module.modulemap</key>
16+
<data>
17+
EuDEeG1dcC1sd+hIW2SkUAImUg8=
18+
</data>
19+
<key>Scripts/copy_and_codesign_revealserver.sh</key>
20+
<data>
21+
aQbLdf9lVnmDd2BfBMGsVPBPdb8=
22+
</data>
23+
</dict>
24+
<key>files2</key>
25+
<dict>
26+
<key>Headers/RevealServer.h</key>
27+
<dict>
28+
<key>hash</key>
29+
<data>
30+
e2S6Vuf8iJXurblvYWL8e3IMO7E=
31+
</data>
32+
<key>hash2</key>
33+
<data>
34+
i4zuiS2fsgwsoicYEzHuBx32JYfKW38gkopt/7FdINY=
35+
</data>
36+
</dict>
37+
<key>Modules/module.modulemap</key>
38+
<dict>
39+
<key>hash</key>
40+
<data>
41+
EuDEeG1dcC1sd+hIW2SkUAImUg8=
42+
</data>
43+
<key>hash2</key>
44+
<data>
45+
tstqiJpIPr4iEd3MDHClLuTB/ciSC/zNlke1AjfSVuU=
46+
</data>
47+
</dict>
48+
<key>Scripts/copy_and_codesign_revealserver.sh</key>
49+
<dict>
50+
<key>hash</key>
51+
<data>
52+
aQbLdf9lVnmDd2BfBMGsVPBPdb8=
53+
</data>
54+
<key>hash2</key>
55+
<data>
56+
UYSfYiTYxoDhVX7UwCYvPXGOWQ4Yrm5DzFoomMlSIMs=
57+
</data>
58+
</dict>
59+
</dict>
60+
<key>rules</key>
61+
<dict>
62+
<key>^</key>
63+
<true/>
64+
<key>^.*\.lproj/</key>
65+
<dict>
66+
<key>optional</key>
67+
<true/>
68+
<key>weight</key>
69+
<real>1000</real>
70+
</dict>
71+
<key>^.*\.lproj/locversion.plist$</key>
72+
<dict>
73+
<key>omit</key>
74+
<true/>
75+
<key>weight</key>
76+
<real>1100</real>
77+
</dict>
78+
<key>^version.plist$</key>
79+
<true/>
80+
</dict>
81+
<key>rules2</key>
82+
<dict>
83+
<key>.*\.dSYM($|/)</key>
84+
<dict>
85+
<key>weight</key>
86+
<real>11</real>
87+
</dict>
88+
<key>^</key>
89+
<dict>
90+
<key>weight</key>
91+
<real>20</real>
92+
</dict>
93+
<key>^(.*/)?\.DS_Store$</key>
94+
<dict>
95+
<key>omit</key>
96+
<true/>
97+
<key>weight</key>
98+
<real>2000</real>
99+
</dict>
100+
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
101+
<dict>
102+
<key>nested</key>
103+
<true/>
104+
<key>weight</key>
105+
<real>10</real>
106+
</dict>
107+
<key>^.*</key>
108+
<true/>
109+
<key>^.*\.lproj/</key>
110+
<dict>
111+
<key>optional</key>
112+
<true/>
113+
<key>weight</key>
114+
<real>1000</real>
115+
</dict>
116+
<key>^.*\.lproj/locversion.plist$</key>
117+
<dict>
118+
<key>omit</key>
119+
<true/>
120+
<key>weight</key>
121+
<real>1100</real>
122+
</dict>
123+
<key>^Info\.plist$</key>
124+
<dict>
125+
<key>omit</key>
126+
<true/>
127+
<key>weight</key>
128+
<real>20</real>
129+
</dict>
130+
<key>^PkgInfo$</key>
131+
<dict>
132+
<key>omit</key>
133+
<true/>
134+
<key>weight</key>
135+
<real>20</real>
136+
</dict>
137+
<key>^[^/]+$</key>
138+
<dict>
139+
<key>nested</key>
140+
<true/>
141+
<key>weight</key>
142+
<real>10</real>
143+
</dict>
144+
<key>^embedded\.provisionprofile$</key>
145+
<dict>
146+
<key>weight</key>
147+
<real>20</real>
148+
</dict>
149+
<key>^version\.plist$</key>
150+
<dict>
151+
<key>weight</key>
152+
<real>20</real>
153+
</dict>
154+
</dict>
155+
</dict>
156+
</plist>

StackScrollView.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
4B6C2DB91D8DA68E003D3A46 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B6C2DB81D8DA68E003D3A46 /* Assets.xcassets */; };
1818
4B6C2DBC1D8DA68E003D3A46 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B6C2DBA1D8DA68E003D3A46 /* LaunchScreen.storyboard */; };
1919
4BDB87D71DBFB49500E70D5B /* BetaStackScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BDB87D61DBFB49500E70D5B /* BetaStackScrollView.swift */; };
20+
4BDB87D91DBFBC8F00E70D5B /* RevealServer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BDB87D81DBFBC8800E70D5B /* RevealServer.framework */; };
21+
4BDB87DA1DBFBC8F00E70D5B /* RevealServer.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4BDB87D81DBFBC8800E70D5B /* RevealServer.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2022
4BE8B6ED1D8E5A9700A4DC33 /* StackScrollView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B6C2D991D8DA3FB003D3A46 /* StackScrollView.framework */; };
2123
4BE8B6EE1D8E5A9700A4DC33 /* StackScrollView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4B6C2D991D8DA3FB003D3A46 /* StackScrollView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2224
4BE8B6F61D8E5AF200A4DC33 /* Then.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BE8B6F51D8E5AF200A4DC33 /* Then.framework */; };
@@ -42,6 +44,7 @@
4244
dstPath = "";
4345
dstSubfolderSpec = 10;
4446
files = (
47+
4BDB87DA1DBFBC8F00E70D5B /* RevealServer.framework in Embed Frameworks */,
4548
4BE8B6F91D8E5B3500A4DC33 /* EasyPeasy.framework in Embed Frameworks */,
4649
4BE8B6EE1D8E5A9700A4DC33 /* StackScrollView.framework in Embed Frameworks */,
4750
4BE8B6F71D8E5AF200A4DC33 /* Then.framework in Embed Frameworks */,
@@ -66,6 +69,7 @@
6669
4B6C2DBB1D8DA68E003D3A46 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6770
4B6C2DBD1D8DA68E003D3A46 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6871
4BDB87D61DBFB49500E70D5B /* BetaStackScrollView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BetaStackScrollView.swift; sourceTree = "<group>"; };
72+
4BDB87D81DBFBC8800E70D5B /* RevealServer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RevealServer.framework; sourceTree = "<group>"; };
6973
4BE8B6F51D8E5AF200A4DC33 /* Then.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Then.framework; path = Carthage/Build/iOS/Then.framework; sourceTree = "<group>"; };
7074
/* End PBXFileReference section */
7175

@@ -82,6 +86,7 @@
8286
isa = PBXFrameworksBuildPhase;
8387
buildActionMask = 2147483647;
8488
files = (
89+
4BDB87D91DBFBC8F00E70D5B /* RevealServer.framework in Frameworks */,
8590
4BE8B6F81D8E5B3500A4DC33 /* EasyPeasy.framework in Frameworks */,
8691
4BE8B6ED1D8E5A9700A4DC33 /* StackScrollView.framework in Frameworks */,
8792
4BE8B6F61D8E5AF200A4DC33 /* Then.framework in Frameworks */,
@@ -94,6 +99,7 @@
9499
4B6C2D8F1D8DA3FB003D3A46 = {
95100
isa = PBXGroup;
96101
children = (
102+
4BDB87D81DBFBC8800E70D5B /* RevealServer.framework */,
97103
4B6C2D9B1D8DA3FB003D3A46 /* StackScrollView */,
98104
4B6C2DB01D8DA68E003D3A46 /* StackScrollView-Demo */,
99105
4B6C2D9A1D8DA3FB003D3A46 /* Products */,
@@ -465,6 +471,7 @@
465471
FRAMEWORK_SEARCH_PATHS = (
466472
"$(inherited)",
467473
"$(PROJECT_DIR)/Carthage/Build/iOS",
474+
"$(PROJECT_DIR)",
468475
);
469476
INFOPLIST_FILE = "StackScrollView-Demo/Info.plist";
470477
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -483,6 +490,7 @@
483490
FRAMEWORK_SEARCH_PATHS = (
484491
"$(inherited)",
485492
"$(PROJECT_DIR)/Carthage/Build/iOS",
493+
"$(PROJECT_DIR)",
486494
);
487495
INFOPLIST_FILE = "StackScrollView-Demo/Info.plist";
488496
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

StackScrollView/BetaStackScrollView.swift

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ open class BetaStackScrollView: UIView, UITableViewDataSource, UITableViewDelega
3131
tableView.backgroundColor = UIColor.clear
3232
tableView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
3333
tableView.frame = bounds
34+
tableView.separatorStyle = .none
35+
tableView.separatorInset = .zero
3436

3537
addSubview(tableView)
3638
}
@@ -45,37 +47,15 @@ open class BetaStackScrollView: UIView, UITableViewDataSource, UITableViewDelega
4547

4648
open func append(view: UIView, animated: Bool) {
4749

48-
let cell = UITableViewCell(frame: .zero)
49-
let contentView = cell.contentView
50-
view.translatesAutoresizingMaskIntoConstraints = false
51-
contentView.addSubview(view)
52-
NSLayoutConstraint.activate([
53-
NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: contentView, attribute: .top, multiplier: 1, constant: 0),
54-
NSLayoutConstraint(item: view, attribute: .right, relatedBy: .equal, toItem: contentView, attribute: .right, multiplier: 1, constant: 0),
55-
NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: contentView, attribute: .bottom, multiplier: 1, constant: 0),
56-
NSLayoutConstraint(item: view, attribute: .left, relatedBy: .equal, toItem: contentView, attribute: .left, multiplier: 1, constant: 0),
57-
])
58-
cells.append(cell)
50+
cells.append(createCell(view: view))
5951

6052
// TODO: Improve performance, animated
6153
tableView.reloadData()
6254
}
6355

6456
open func append(views: [UIView], animated: Bool) {
6557

66-
let _cells = views.map { view -> UITableViewCell in
67-
let cell = UITableViewCell(frame: .zero)
68-
let contentView = cell.contentView
69-
view.translatesAutoresizingMaskIntoConstraints = false
70-
contentView.addSubview(view)
71-
NSLayoutConstraint.activate([
72-
NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: contentView, attribute: .top, multiplier: 1, constant: 0),
73-
NSLayoutConstraint(item: view, attribute: .right, relatedBy: .equal, toItem: contentView, attribute: .right, multiplier: 1, constant: 0),
74-
NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: contentView, attribute: .bottom, multiplier: 1, constant: 0),
75-
NSLayoutConstraint(item: view, attribute: .left, relatedBy: .equal, toItem: contentView, attribute: .left, multiplier: 1, constant: 0),
76-
])
77-
return cell
78-
}
58+
let _cells = views.map(createCell)
7959

8060
cells += _cells
8161
// TODO: Improve performance, animated
@@ -96,6 +76,21 @@ open class BetaStackScrollView: UIView, UITableViewDataSource, UITableViewDelega
9676

9777
private let tableView = UITableView(frame: .zero, style: .plain)
9878

79+
private func createCell(view: UIView) -> UITableViewCell {
80+
let cell = UITableViewCell(frame: .zero)
81+
cell.separatorInset = .zero
82+
let contentView = cell.contentView
83+
view.translatesAutoresizingMaskIntoConstraints = false
84+
contentView.addSubview(view)
85+
NSLayoutConstraint.activate([
86+
NSLayoutConstraint(item: view, attribute: .top, relatedBy: .equal, toItem: contentView, attribute: .top, multiplier: 1, constant: 0),
87+
NSLayoutConstraint(item: view, attribute: .right, relatedBy: .equal, toItem: contentView, attribute: .right, multiplier: 1, constant: 0),
88+
NSLayoutConstraint(item: view, attribute: .bottom, relatedBy: .equal, toItem: contentView, attribute: .bottom, multiplier: 1, constant: 0),
89+
NSLayoutConstraint(item: view, attribute: .left, relatedBy: .equal, toItem: contentView, attribute: .left, multiplier: 1, constant: 0),
90+
])
91+
return cell
92+
}
93+
9994
// MARK: - UITableViewDataSource
10095

10196
public func numberOfSections(in tableView: UITableView) -> Int {

0 commit comments

Comments
 (0)