Closed rsanchezsaez closed 9 years ago
I cherry picked these into my fork but it crashes on this line https://github.com/obviousengineering/WYPopoverController/blob/06a877d2336f6ff838a48fc65c44e9e236e54bf4/WYPopoverController/WYPopoverController.m#L1730
The error is:
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* Illegal property type, c for appearance setter, _installAppearanceSwizzlesForSetter:'
I could have merged it wrong but it seemed like a very straight forward merge... Any ideas?
Here is the debugger view of aTheme
and appearance
Hmm, it doesn't crash for me.
Can you push your cherry-picked code to a temporary branch on your fork? A sample of the user code that makes it crash would help as well.
If you are using a WYPopoverTheme
, did you replace the @NO
/ @YES
in your theme by NO
/ YES
?
Yes i replaced them, wouldn't build otherwise :) I reverted my changes for now because Im busy with something else. Will look into this again soon though.
Keep me posted, I'm really intrigued and want to fix any problem that there may be.
I don't use a custom WYPopoverTheme
, but this code works for me:
WYPopoverBackgroundView *popoverAppearance = [WYPopoverBackgroundView appearance];
popoverAppearance.usesRoundedArrow = NO;
Another thought I had, on which iOS version did you experience the crash? Maybe it's an iOS 7 (or earlier) thing.
I think it was on iOS 7 actually.
Indeed, it's actually an iOS 7 and earlier issue. The problem is that UIAppearanceContainer
doesn't officially support BOOL
s (although it seems Apple added undocumented BOOL
support on iOS 8).
I'm going to add a new commit to the pull request fixing this in a moment.
Done. It should work now. Thanks for spotting this @maciekish! :-)
Ill try it in a bit, thanks :)
Works a treat, thanks again.
@sammcewan Any chance we can have this merged please?
@maciekish Sincere apologies. I've been AWOL for a little. Back on the job.
Fixes issue #28. The problem was related to drawing the rounded arrow points in the incorrect order.
Also:
UIBezierPath
s, using the singleouterPathRef
instead.adjustsTintColor
todimsBackgroundViewsTintColor
.usesRoundedArrow
anddimsBackgroundViewsTintColor
fromNSNumber
toBOOL
. We avoid packing/unpacking betweenNSNumber
andBOOL
when setting this.