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

Crashing When displaying on screen #4

Closed
Esko918 opened this issue Apr 3, 2018 · 3 comments
Closed

Crashing When displaying on screen #4

Esko918 opened this issue Apr 3, 2018 · 3 comments

Comments

@Esko918
Copy link

Esko918 commented Apr 3, 2018

Im displaying the view programmatically in one of my views as a progress indicator for when data is being downloaded. When I display the view the code keeps crashing on this line textLayerParent.position = self.myCenter in the preparation method. Any idea why?

@Esko918
Copy link
Author

Esko918 commented Apr 3, 2018

Fatal error: Unexpectedly found nil while unwrapping an Optional value
This is the error

@ayman-ibrahim
Copy link
Owner

Hello @Esko918
The problem is that self.myCenter is not set as layoutSubviews() most probably not being called
can you show me, how are you adding the view programmatically ?

@Esko918
Copy link
Author

Esko918 commented May 13, 2018

Sorry I cant. We ended up using a different module for this and I don't remember what I wrote as the code. But its probably just what you suggested in your git hub since I know I couldn't get it passed this issue. It could have been an iOS 10.x issue also since I know throughout this whole project iOS 10 was making certain code act a lot differently than in iOS 9 and 11

@Esko918 Esko918 closed this as completed May 13, 2018
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

2 participants