Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Design #25

Closed
kiokumicu opened this issue Oct 19, 2015 · 9 comments
Closed

Custom Design #25

kiokumicu opened this issue Oct 19, 2015 · 9 comments

Comments

@kiokumicu
Copy link

Hi!
I compile framework with Carthage, and add PasscodeLockView.xib, PasscodeSignButton.swift, PasscodeSignPlaceholderView.swift to project.
For PasscodeLockView.xib set owner PasscodeLockViewController class.
After compile passcode show normal, but after tap on number pad got error "PasscodeLock was compiled with optimization - stepping may behave oddly; variables may not be available."
What am i doing wrong ?

@guidelfrate
Copy link

Same problem here! :/
Seems to be something related to the placeholders. I checked all connections and everything is fine.

@gblotter
Copy link
Contributor

I've been seeing similar weirdnesses and there actually is an open radar: https://openradar.appspot.com/23114017

@guidelfrate
Copy link

@gblotter, really there is a problem with @IBInspectable and @IBDesignable. But I think I solved this copying PasscodeSignButton.swift and PasscodeSignPlaceholderView.swift to my project.

Now my XIB have correct buttons and placeholder, and I can change its properties in Interface Builder, but exactly how @kiokumicu said, I got the error when I tap on any number.

No errors are throw when I use the same XIB on Demo Project. What are we missing?

@guidelfrate
Copy link

I found a temporary solution: using Carthage, I replaced the PasscodeLockView.xib found in /Carthage/Checkouts/SwiftPasscodeLock/PasscodeLock by my custom XIB. Then I compiled the framework again using carthage build. Remember to remove your custom XIB from your project, since it is embedded directly in the framework now.

As alternative, you can add a Run Script build phase that invokes Carthage like so:
/usr/local/bin/carthage build --platform "$PLATFORM_NAME" "$SRCROOT".

For now it works, but it should work as described out of box. I'm looking forward for a definitive solution. :)

@velikanov
Copy link

have anybody a working example of extending the PasscodeLockView.xib?
I just don't understand what I need to do to make this happen

@yankodimitrov
Copy link
Owner

To use a custom design create a new nib file called PasscodeLockView.xib in your project. Then select the File's Owner and in the Identity Inspector set the class to PasscodeLockViewController and Module to PasscodeLock.

@kiokumicu
Copy link
Author

Now I have another error with custom PasscodeLockView.xib when tap on on any number
fatal error: NSArray element failed to match the Swift Array Element type
Install from cocoapods and add PasscodeSignButton.swift, PasscodeSignPlaceholderView.swift files to project

@zcanter
Copy link

zcanter commented Jul 3, 2016

Love this library, but customization is still really hard to grasp. It is necessary because Apple will deny submitted apps that do not have a customized PasscodeLock. If you could provide a little more documentation on how to achieve customization that would be great. But, yeah GREAT library seriously.

@zcanter
Copy link

zcanter commented Jul 7, 2016

Ended up solving all of this by using the Pod file installation over the Carthage method. Then just follow the directions as posted.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

pod 'PasscodeLock', '~> 1.0.2'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants