Skip to content

Commit

Permalink
Merge branch 'main' into layout-formsheet-presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vtourraine authored Mar 24, 2021
2 parents e9ab602 + 6d8d617 commit 7b138be
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 2.0.1 (work in progress)

- Update `AcknowListViewController` to make initializers available with Objective-C
- Fix header/footer layout when resizing `AcknowListViewController`


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
D7A999492058275600A3F668 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D7A999472058275600A3F668 /* Main.storyboard */; };
D7A9994B2058275600A3F668 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D7A9994A2058275600A3F668 /* Assets.xcassets */; };
D7A999502058277C00A3F668 /* Pods-acknowledgements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1AD73B8D1CAC3A990084F8CA /* Pods-acknowledgements.plist */; };
D7FAF74D2609ECD900DC6B7C /* ObjCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D7FAF74C2609ECD900DC6B7C /* ObjCViewController.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -87,6 +88,8 @@
D7A999482058275600A3F668 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
D7A9994A2058275600A3F668 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
D7A9994C2058275600A3F668 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D7FAF74B2609ECD900DC6B7C /* ObjCViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ObjCViewController.h; sourceTree = "<group>"; };
D7FAF74C2609ECD900DC6B7C /* ObjCViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ObjCViewController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -138,6 +141,7 @@
1F6C52B31B7F495700B9A7CC /* Images.xcassets */,
1F6C52B51B7F495700B9A7CC /* LaunchScreen.xib */,
1F6C52AA1B7F495700B9A7CC /* Supporting Files */,
D7FAF7502609ECE800DC6B7C /* Objective-C */,
);
path = AcknowExample;
sourceTree = "<group>";
Expand Down Expand Up @@ -181,6 +185,15 @@
path = AcknowExampleTV;
sourceTree = "<group>";
};
D7FAF7502609ECE800DC6B7C /* Objective-C */ = {
isa = PBXGroup;
children = (
D7FAF74B2609ECD900DC6B7C /* ObjCViewController.h */,
D7FAF74C2609ECD900DC6B7C /* ObjCViewController.m */,
);
name = "Objective-C";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -233,7 +246,7 @@
TargetAttributes = {
1F6C52A61B7F495700B9A7CC = {
CreatedOnToolsVersion = 6.4;
LastSwiftMigration = 1000;
LastSwiftMigration = 1240;
};
D7A999402058275600A3F668 = {
CreatedOnToolsVersion = 9.2;
Expand Down Expand Up @@ -315,6 +328,7 @@
files = (
1F6C52AF1B7F495700B9A7CC /* ViewController.swift in Sources */,
1F6C52AD1B7F495700B9A7CC /* AppDelegate.swift in Sources */,
D7FAF74D2609ECD900DC6B7C /* ObjCViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -475,12 +489,14 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = AcknowExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "net.vtourraine.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
Expand All @@ -489,6 +505,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = AcknowExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
Expand Down
28 changes: 28 additions & 0 deletions Examples/AcknowExampleManual/AcknowExample/ObjCViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// ObjCViewController.h
//
// Copyright (c) 2021 Vincent Tourraine (https://www.vtourraine.net)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

@import UIKit;

@interface ObjCViewController : UIViewController

@end
39 changes: 39 additions & 0 deletions Examples/AcknowExampleManual/AcknowExample/ObjCViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// ObjCViewController.m
//
// Copyright (c) 2021 Vincent Tourraine (https://www.vtourraine.net)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import "ObjCViewController.h"

@import AcknowList;

@implementation ObjCViewController

- (void)presentAcknowListViewController {
NSString *path = @"";
AcknowListViewController *viewController = [[AcknowListViewController alloc] initWithPlistPath:path style:UITableViewStylePlain];
viewController.headerText = @"...";
viewController.footerText = @"...";

[self presentViewController:viewController animated:YES completion:nil];
}

@end
4 changes: 2 additions & 2 deletions Sources/AcknowList/AcknowListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ open class AcknowListViewController: UITableViewController {

- returns: The new `AcknowListViewController` instance.
*/
public convenience init(fileNamed fileName: String) {
@objc public convenience init(fileNamed fileName: String) {
if let path = AcknowListViewController.acknowledgementsPlistPath(name: fileName) {
self.init(plistPath: path)
}
Expand All @@ -92,7 +92,7 @@ open class AcknowListViewController: UITableViewController {

- returns: The new `AcknowListViewController` instance.
*/
public convenience init(plistPath: String, style: UITableView.Style = .grouped) {
@objc public convenience init(plistPath: String, style: UITableView.Style = .grouped) {
self.init(acknowledgements: [], style: style)

load(from: plistPath)
Expand Down

0 comments on commit 7b138be

Please sign in to comment.