Skip to content

Commit 21469b7

Browse files
author
Jason Rodriguez
committed
updates readme
1 parent 2f7bfd3 commit 21469b7

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
11
# LTHPasscodeViewController
22
Simple to use iOS 7 style Passcode - the one you get in Settings when changing your passcode.
33

4+
# Installation
5+
6+
### CocoaPods
7+
8+
[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate LTHPasscodeViewController into your Xcode project using CocoaPods, specify it in your `Podfile`:
9+
10+
```ruby
11+
pod 'LTHPasscodeViewController', '~> 4.0.1'
12+
```
13+
14+
### Swift Package Manager
15+
16+
__NOTE__: _These instructions are intended for usage on Xcode 11 and higher. Xcode 11 is the first version of Xcode that integrates Swift Package manager and makes it way easier to use than it was at the command line. If you are using older versions of Xcode, we recommend using CocoaPods._
17+
18+
1. Go to File > Swift Packages > Add Package Dependency...
19+
2. Paste the URL to the LTHPasscodeViewController repo on GitHub (https://github.com/rolandleth/LTHPasscodeViewController.git) into the search bar, then hit the Next button:
20+
3. Select what version you want to use, then hit next (Xcode will automatically suggest the current version Up to Next Major).
21+
4. Select the `LTHPasscodeViewController` library and then hit finish.
22+
5. You're done!
23+
24+
### Manually
25+
26+
Simply clone the repo and drag the contents of `LTHPasscodeViewController` to your project.
27+
428
# How to use
5-
Drag the contents of `LTHPasscodeViewController` to your project, or add `pod 'LTHPasscodeViewController'` to your Podfile (preffered).
629

730
If your app uses extensions, `LTH_IS_APP_EXTENSION` needs to be defined:
831

@@ -14,8 +37,8 @@ Example, called in `application:didFinishLaunchingWithOptions`:
1437
```objc
1538
[LTHPasscodeViewController useKeychain:NO];
1639
if ([LTHPasscodeViewController doesPasscodeExist]) {
17-
if ([LTHPasscodeViewController didPasscodeTimerEnd])
18-
[[LTHPasscodeViewController sharedUser] showLockScreenWithAnimation:YES
40+
if ([LTHPasscodeViewController didPasscodeTimerEnd])
41+
[[LTHPasscodeViewController sharedUser] showLockScreenWithAnimation:YES
1942
withLogout:NO
2043
andLogoutTitle:nil];
2144
}
@@ -46,7 +69,7 @@ if ([LTHPasscodeViewController doesPasscodeExist]) {
4669

4770
```objc
4871
/**
49-
@param viewController The view controller where the passcode view controller will be displayed.
72+
@param viewController The view controller where the passcode view controller will be displayed.
5073
@param asModal Set to YES to present as a modal, or to NO to push on the current nav stack.
5174
*/
5275
- (void)showForEnablingPasscodeInViewController:(UIViewController *)viewController asModal:(BOOL)isModal;

0 commit comments

Comments
 (0)