-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added fallback version for iOS < 15 (also useable on iOS15+
- Loading branch information
Showing
25 changed files
with
2,060 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "cancel.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// | ||
// BottomSheetViewController.h | ||
// navi-lite | ||
// | ||
// Created by Phineas.Huang on 2020/5/29. | ||
// Copyright © 2020 Garmin. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
typedef enum Director { | ||
up, | ||
down, | ||
}Director; | ||
|
||
typedef enum State { | ||
partial, | ||
expanded, | ||
full, | ||
dismiss | ||
}State; | ||
static State maxState = full; | ||
static CGFloat maxPosition = 0; | ||
static State minState = partial; | ||
static CGFloat minPosition = 0; | ||
static UIEdgeInsets insets; | ||
static bool panEnabled = YES; | ||
static bool panInit = NO; | ||
static bool panFromScrollView = NO; | ||
|
||
static bool fullPositon = YES; | ||
static bool mediumPosition = YES; | ||
static bool smallPosition = YES; | ||
static CGFloat lastScrollViewOffsetY = 0; | ||
static CGFloat newSrollViewOffsetY = 0; | ||
static CGFloat lastTranslation = 0; | ||
|
||
|
||
static NSDictionary *userDetents; | ||
static CGFloat fullViewYPosition = 0; | ||
static CGFloat partialViewYPosition = 0; | ||
static CGFloat expandedViewYPosition = 0; | ||
static bool dismissModeOfSheet = NO; | ||
static bool backgroundViewHidden = NO; | ||
static UIColor *viewBackgroundColor = nil; | ||
static UIColor *dimmedViewBackgroundColor = nil; | ||
static NSString *largestUndimmedDetent = nil; | ||
static NSString *startDetent = nil; | ||
static NSString *detentString = nil; | ||
@interface BottomSheetViewController : UIViewController | ||
@property (assign, nonatomic) State lastStatus; | ||
@property (assign, nonatomic) NSString *selectedDetentIdentifier; | ||
|
||
- (id)proxyOfBottomSheetController; | ||
- (void)setProxyOfBottomSheetController:(id)args; | ||
- (void)moveViewWithGesture:(UIPanGestureRecognizer *)recognizer; | ||
- (void)panGesture:(UIPanGestureRecognizer *)recognizer; | ||
- (void)moveView:(State)state; | ||
- (State)state; | ||
- (void)panRecognizerEnabled:(bool)enabled; | ||
- (bool)panRecognizerState; | ||
- (UIPanGestureRecognizer *)panRecognizer; | ||
- (void)panRecognizerInit:(bool)enabled; | ||
- (void)panFromScrollView:(bool)enabled; | ||
|
||
- (void)scrollView:(UIScrollView*)scrollview; | ||
- (void)lastContentOffsetY:(CGFloat)contentOffsetY; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.