antiraum / thpinviewcontroller Goto Github PK
View Code? Open in Web Editor NEWiOS 7 Style PIN Screen for iPhone and iPad
License: MIT License
iOS 7 Style PIN Screen for iPhone and iPad
License: MIT License
Any suggestions on how to get the Passcode PIN View to show up from a UISplitViewController AppDelegate?
I am using below code but it never shows up.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self.window.rootViewController presentViewController:pinViewController animated:YES completion:nil];
...
Any suggestions are appreciated.
Hi there,
Awesome VC, super easy to use. many thanks.
the only issue I've got right now is about Pad number buttons.
They look weird here
does anyone have idea about why this may happen?
BSnapPinViewController *pinViewController = [[BSnapPinViewController alloc] initWithDelegate:self];
pinViewController.promptTitle = @"Enter Pin";
pinViewController.promptColor = [UIColor darkGrayColor];
pinViewController.view.tintColor = [UIColor redColor];
[pinViewController.view.layer setBorderColor:[[UIColor blueColor] CGColor]];
[pinViewController.view.layer setBorderWidth:2.f];
pinViewController.hideLetters = NO;
// Solid background color
pinViewController.backgroundColor = [UIColor darkGrayColor];
pinViewController.disableCancel = YES;
// // Transparent background color
UIViewController *rootViewController = self.window.rootViewController;
// rootViewController.view.tag = THPinViewControllerContentViewTag;
// rootViewController.modalPresentationStyle = UIModalPresentationCurrentContext;
// pinViewController.translucentBackground = YES;
[rootViewController presentViewController:pinViewController animated:NO completion:nil];
I was running this in iPhone 4-inch 7.0 simulator.
Cheers.
First off I would like to say thank you for this wonderful control, it does exactly what it says and does it well. The documentation in particular is impressive!
It would be nice if display of the Cancel button was optional, while the Delete button is useful in pretty much all scenarios, the Cancel button only makes sense when the view controller is presented modally. I know that you intend the view controller to be used modally so you likely don't see this as a problem.
Just to give you an idea of our use case, we embed the view controller in the very first screen that is shown after launching the app. Naturally in this case we have no where to go when Cancel is tapped, so displaying it could confuse users.
In the THPinView line 80 instead of addConstraints you should call addConstraint
That's "Apps that appear confusingly similar to an existing Apple product, interface, or advertising theme will be rejected". I also tried with hideLetters = NO, with the same result.
The same app, with THPinViewController has been approved many times before (as usual) so YMMV.
This is only as an advice to the other users of this very useful component. I'll try to see if I can tweak the UI a bit, in case will share my code back.
Thank you again for the code!
Not sure why this is crashing on iOS 8.0
2015-09-23 19:15:22.979 inSured[3517:293362] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unable to parse constraint format:
Expected a number or key from the metrics dictionary, but encountered something else
H:|[circle0]- (padding)-[circle1]- (padding)-[circle2]- (padding)-[circle3]|
^'
Is there a way to have the pinViewControll not be dismissed if the Pin Entry was Unsuccessful?
pinViewControllerWillDismissAfterPinEntryWasUnsuccessful
Thanks.
Thanks for THPinVC! Have you considered making it configurable to look and work like a phone dial pad?
Hello,
In the readme you mention this pod has support for iphone/ipad portrati and landscape orientation, but when I test on iPhone landscape top and bottom buttons of the pin-view are cut-off by the screen...
In other words, I don't think it is implemented... Is this correct?
Thnx
In my case, I want that when I lock the app, nobody can unlock it without the password, so the cancel button is not necessary there
In a previous version, the text of the cancel button label would follow whatever color was set as promptColor, now it is always white, which is a problem when using a white background. Sample code:
THPinViewController *pinViewController = [[THPinViewController alloc] initWithDelegate:self];
pinViewController.disableCancel = NO;
pinViewController.promptTitle = title;
UIColor *darkBlueColor = [UIColor colorWithRed:0.012f green:0.071f blue:0.365f alpha:1.0f];
pinViewController.promptColor = darkBlueColor;
pinViewController.view.tintColor = darkBlueColor;
pinViewController.backgroundColor = [UIColor whiteColor];
[self presentViewController:pinViewController animated:animated completion:nil];
//cancel button not visible
Can You add code for my question
self.blurView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
self.blurView.frame = self.parentVc.view.bounds;
self.blurView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.parentVc.view addSubview:self.blurView];
Is there a built in feature to set the password the first time? Any suggestions? From what I can see it currently validates once you passcode is known.
Thank you for a great control I do like it.
Hello,
really nice VC !!!
However, I have a bug on my iphone 5S with iOS 8. The inputCircle view is at the top of the screen !!!!
Moreover, it would be awesome if we could resize the view (I have a tabBar so the layout is not working correctly).
See you !
Not adapted to large screen phone, like 6plus, 7plus, iphoneX
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.