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

Can't assign UIColor to the button color #27

Closed
HenriqueDoura opened this issue Mar 30, 2016 · 7 comments
Closed

Can't assign UIColor to the button color #27

HenriqueDoura opened this issue Mar 30, 2016 · 7 comments

Comments

@HenriqueDoura
Copy link

I have a color and I'm trying to assign it as the button color. It's crashing right before the view with the button appears and the console says:
2016-03-29 22:23:31.643 Homework[34702:2044491] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -CGColor not defined for the UIColor <UIPlaceholderColor: 0x100a1ada0>; need to first convert colorspace.' *** First throw call stack: (0x184700f5c 0x1992f7f80 0x184700ea4 0x18a07c824 0x100173ff8 0x10016df94 0x10016e098 0x189488b4c 0x189473bd4 0x189472df4 0x189454d00 0x1894549ec 0x18945407c 0x189453dd0 0x18944d4bc 0x1846b7c30 0x1846b59d4 0x1845e4de0 0x189cc40ac 0x189cbef44 0x100051eb8 0x199b228b8) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
It points the crash to the class KCFloatingActionButton.swift line 433 and when you call that function in the same file, line 220. I'm sure the color I'm assigning is a UIColor.

@HenriqueDoura
Copy link
Author

Fixed, it was just a silly Xcode bug.

@kciter
Copy link
Owner

kciter commented Mar 31, 2016

I'm sorry for my late reply.
I'm glad you solved well.

@HenriqueDoura
Copy link
Author

No worries. Is there a way to put a sound when the floating button is
tapped? I've alreay tried to use gesture recognizers, the function
touchesBegan to see if the user tapped on the fab.center, but none of them
worked.

Thanks in advance

Em quinta-feira, 31 de março de 2016, Lee Sun-Hyoup <
notifications@github.com> escreveu:

I'm sorry for my late reply.
I'm glad you solved well.


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#27 (comment)

kciter added a commit that referenced this issue Apr 1, 2016
@kciter
Copy link
Owner

kciter commented Apr 1, 2016

Hello, @HenriqueDoura
I added delegate func in 1.3.1 version. Check it up please.
Thanks.

@HenriqueDoura
Copy link
Author

Hello, thanks for adding it. I was only able to test it today, and it
doesn't seem to be working. I've already inherited from the delegate
protocol and added the functions, but nothing that I'm putting inside the
functions is working.

Em sexta-feira, 1 de abril de 2016, Lee Sun-Hyoup notifications@github.com
escreveu:

Hello, @HenriqueDoura https://github.com/HenriqueDoura
I added delegate func in 1.3.1 version. Check it up please.
Thanks.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#27 (comment)

@HenriqueDoura
Copy link
Author

Totally my bad, it's working fine. I forgot to actually call the delegate!
Another question: why are the item icons in the center? If I put a big
image it still is centered and it doesn't look so cool

On Sun, Apr 3, 2016 at 8:03 PM, Henrique Dourado <henriquendourado@gmail.com

wrote:

Hello, thanks for adding it. I was only able to test it today, and it
doesn't seem to be working. I've already inherited from the delegate
protocol and added the functions, but nothing that I'm putting inside the
functions is working.

Em sexta-feira, 1 de abril de 2016, Lee Sun-Hyoup <
notifications@github.com> escreveu:

Hello, @HenriqueDoura https://github.com/HenriqueDoura
I added delegate func in 1.3.1 version. Check it up please.
Thanks.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#27 (comment)

@kciter
Copy link
Owner

kciter commented Apr 10, 2016

Hello, @HenriqueDoura
If you want to put a big image, you should resize your image.
And if you don't like the centered image, you can use imageOffset in KCFloatingActionButtonItem.
Thanks :)

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