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

Missing Title View Support? #19

Open
aasatt opened this issue Jan 19, 2018 · 3 comments
Open

Missing Title View Support? #19

aasatt opened this issue Jan 19, 2018 · 3 comments
Labels

Comments

@aasatt
Copy link

aasatt commented Jan 19, 2018

It looks like titleView is never added to the passcodeView I tried to search for [addSubView:self.titleView] in the project and didn't come across anything.

I forked and added:

if (self.titleView.superview == nil) {
        [self addSubview:self.titleView];
 }

To the LayoutSubviews methods of passcodeView for now. (inside the if (self.titleView) {...})

  • [✅] I have read this issue template and provided all possible information.
  • [✅ ] I'm using CocoaPods and have run pod update before filing this issue.

Hardware / Software

Which version of the library were you using?
0.0.2
Which version of iOS are you running?
11.2
What model of iOS device were you testing on?
iPhone X
If using CocoaPods, which version of CocoaPods are you on?
Set git url directly to this repo

Goals

What is the outcome result you want to achieve with this library?
n/a

Expected Results

Setting a UIVew for passCodeController.passcodeView.titleView will have it show up above the title label

What did you expect to happen?
To see the title view above the title label

Actual Results

What happened instead? (Please attach a screenshot/screen recording if possible)
The title label moves down to the proper offset for the titleView height but no title view is added to the passcodeView

Steps to Reproduce

Give the passcodeView of the controller a title view:

        let controller = TOPasscodeViewController(style: .translucentDark, passcodeType: .fourDigits)
        controller.passcodeView.titleView = {
            let width = controller.passcodeView.titleLabel.bounds.width
            let i = UIImageView(frame: CGRect(x: 0, y: 0, width: width, height: width*0.2672413793))
            i.image = #imageLiteral(resourceName: {imageName})
            i.contentMode = .scaleAspectFit
            return i
        }()

Build and run. Use the UI explorer to inspect the views. See that titleView was never added to passcodeView

@TimOliver
Copy link
Owner

Hi @aasatt!

Ah, you might be right. I've put in all of the layout provisioning code for the title view, but I might have forgotten to put in the actual set up code.

I'll look into it when I get the chance.

Thanks for the issue!

@Duanyangyu
Copy link

+1

@TimOliver TimOliver added the bug label Feb 1, 2018
@jasmit34
Copy link

Hi @TimOliver Did you get a chance to check? I have facing same issue.
Hi @aasatt Do you do that titleview ?

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

No branches or pull requests

4 participants