Skip to content

Commit da60aac

Browse files
authored
Add support for view controller presentation (SwiftKickMobile#198)
* Add support for view controller presentation * Update comments * Implement review feedback * Implement review feedback * Add segue identifier * Mostly working * Bug fixing * Round corners using squicles * Support squircles and tab layout for view controlllers * Remove internal deprecation warnings * Tweak colors * Bug fixes * Animate mask layer on rotation events * Preserve preferred height of view controller * Add framework for segue convenience classes * Share segue extras scheme * Fix segue framework compile * Deintegrate CocoaPods from demo projects Had to do this to work with Carthage due to a bug Carthage/Carthage#2549 * Add auto-rubber banding * Update code comments * Documentation updates * More documentation * Debugging docs * Debug docs * Debug docs * Debug docs * Debug docs * Asset update * Doc updates * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update ViewControllers.md * Update docs * Update ViewControllers.md * Update README.md * Update README.md * Update README.md * Update README.md * Simlify MarginAdjustable protocol * Update customization section * Update README.md * Update README.md * Update README.md * Update README.md * Update docs * Update changelog * Update README.md * Update README.md * Update README.md * Update README.md * Reduce banner image size * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update layouts * Fix backward compatibility bug * Fix CocoaPods integration * Remove debug code * Add link
1 parent afa5b34 commit da60aac

File tree

95 files changed

+2916
-3557
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2916
-3557
lines changed

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## 5.0.0
5+
6+
### Breaking Changes
7+
8+
* Removed support for iOS 8.
9+
10+
### Features
11+
* Add support for modal view controller presentation using [`SwiftMessagesSegue`](./SwiftMessages/SwiftMessagesSegue.swift) custom segue subclass. Try it out in the "View Controllers" section of the Demo app. In addition to the class documentation, more can be found in the [View Controllers](./View Controllers.md) readme.
12+
* Update nib files to be more visually consistent with iPhone X:
13+
* Introduce [`CornerRoundingView`](./SwiftMessages/CornerRoundingView.swift), which provides configurable corner rounding using squircles (the smoother method of rounding corners that you see on app icons). Nib files that feature rounded corners have their `backgroundView` assigned to a `CornerRoundingView`. `CornerRoundingView` provides a `roundsLeadingCorners` option to dynamically round only the leading corners of the view when presented from top or bottom (a feature used for the tab-style layouts).
14+
* Increased the default corner radius to 20. Corner radius can be changed by either modifying the nib file or
15+
* Reworked the [`MarginAdjustable`](./SwiftMessages/MarginAdjustable.swift) to improve configurability of layout margins.
16+
* Add rubber-banding to the interactive dismissal gesture. Rubber banding is automatically applied for views where `backgroundView` is inset from the message view's edges.
17+
* Added `showDuration` and `hideDuration` properties to the `Animator` protocol (with default implementation that returns `nil`). These values enable animations to work for view controller presentation.
18+
19+
### Fixes
20+
21+
* #202 bodyLabel should set textAlignment to .natural
22+
* #200 Automatic Presentation Context Broken
23+
* Fix default value of `TopBottomAnimation.closePercentThreshold`
24+
425
## 4.1.4
526

627
### Bug Fixes

Demo/.Podfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
target 'Demo' do
2+
use_frameworks!
3+
workspace 'Demo.xcworkspace'
4+
xcodeproj 'Demo.xcodeproj'
5+
pod 'SwiftMessages/App', :path => '../'
6+
pod 'SwiftMessages/SegueExtras', :path => '../'
7+
end
8+

Demo/Demo.xcodeproj/project.pbxproj

+132-238
Large diffs are not rendered by default.

Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme

+5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
</BuildableReference>
6363
</BuildableProductRunnable>
6464
<AdditionalOptions>
65+
<AdditionalOption
66+
key = "MallocStackLogging"
67+
value = ""
68+
isEnabled = "YES">
69+
</AdditionalOption>
6570
</AdditionalOptions>
6671
</LaunchAction>
6772
<ProfileAction

Demo/Demo.xcodeproj/xcshareddata/xcschemes/iMessageDemo.xcscheme

-108
This file was deleted.

Demo/Demo/AppDelegate.swift

+4-22
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,17 @@
88

99
import UIKit
1010

11+
let brandColor = UIColor(red: 42/255.0, green: 168/255.0, blue: 250/255.0, alpha: 1)
12+
1113
@UIApplicationMain
1214
class AppDelegate: UIResponder, UIApplicationDelegate {
1315

1416
var window: UIWindow?
1517

1618
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
19+
window?.tintColor = brandColor
20+
UISwitch.appearance().onTintColor = brandColor
1721
return true
1822
}
19-
20-
func applicationWillResignActive(_ application: UIApplication) {
21-
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
22-
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
23-
}
24-
25-
func applicationDidEnterBackground(_ application: UIApplication) {
26-
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
27-
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
28-
}
29-
30-
func applicationWillEnterForeground(_ application: UIApplication) {
31-
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
32-
}
33-
34-
func applicationDidBecomeActive(_ application: UIApplication) {
35-
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
36-
}
37-
38-
func applicationWillTerminate(_ application: UIApplication) {
39-
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
40-
}
4123
}
4224

0 commit comments

Comments
 (0)