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

what kind of view that i can connect with "@IBOutlet weak var circularPicker: AGCircularPicker!" #2

Closed
justin3527 opened this issue Jul 9, 2017 · 6 comments

Comments

@justin3527
Copy link

hello .
this source is very awesome
i shout when i found this library

but i have some problem when i use it
can you help me?

what kind of view that i can connect with "@IBOutlet weak var circularPicker: AGCircularPicker!"
i never know
please help me
i need the this library

thank you

@justin3527
Copy link
Author

2017-07-09 5 25 17

And i have this issue
this code is sample code

@savilov
Copy link
Collaborator

savilov commented Jul 10, 2017

Hi @justin3527, AGCircularPicker is a UIView, so you can add UIView in storyboard or xib and specify AGCircularPicker class in Identity Inspector. Another option is to add the AGCircularPicker from the code.

Regarding the crash can you please provide more information about it? Did you just download the example and run it? Or did you try to create your own example?

@justin3527
Copy link
Author

hi @savilov , first of all , i really thank you for your kind comment
then i try again, but i still have some issue

  1. l try that i link the IBOutlet variable and UIView in the storyboard
    but it is not connected
    2017-07-11 11 31 39

  2. i try that i add the variable of AGCircularPicker using addSubView method
    but it also occur the clash when i add the options
    this code is copied the your example to my class
    2017-07-11 11 33 14

can you help me again?
i really hope to using your library

thank you

@justin3527
Copy link
Author

my test env is [iphone7 / swift3.0 / xcode8.3.3 / ios 10.3.2]

@savilov
Copy link
Collaborator

savilov commented Jul 11, 2017

Hi @justin3527

  1. To connect IBOutlet you should specify the class for UIView in the Identity Inspector like this:

circular_picker

  1. The reason why app crashes is that when you set options your circularPicker property is nil, so you need to initialize it before setting options. For instance:

circularPicker = AGCircularPicker(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
circularPicker.options = [hourOption, minuteOption, secondOption]
circularPicker.delegate = self

@justin3527
Copy link
Author

oh, @savilov ! really thannnnnnnk yooooou!!!
I feel scarcity and shame.
this issue is very basic problem
I once again feel my shortage.

I am currently in the learning step. so your teaching is very helpful
i could learn the new skill of iOS

Thank you once more

@savilov savilov closed this as completed Jul 11, 2017
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