CLCascade icon indicating copy to clipboard operation
CLCascade copied to clipboard

CLSegmentedView setViewSize: unrecognized selector sent to instance

Open 1am opened this issue 13 years ago • 2 comments

Hi Please pull the changes from https://github.com/appunite/CLCascade/pull/26/files#diff-10 - the readonly attribute causes the application to crash when i tried try to add a new subview with the controller inheriting from CLViewController. When i removed the attribute the view was added as it should.

The output from the debugger looked like this:``` 2012-04-10 13:45:04.746 MyApp -[CLSegmentedView setViewSize:]: unrecognized selector sent to instance 0xb3b5390 2012-04-10 13:45:04.748 MyApp *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CLSegmentedView setViewSize:]: unrecognized selector sent to instance 0x6bfb8b0'

1am avatar Apr 10 '12 12:04 1am

please check master, i've added CLSegmentedView+Extension

emilwojtaszek avatar Apr 11 '12 11:04 emilwojtaszek

The problem is still there. When i remove readonly from https://github.com/appunite/CLCascade/blob/master/src/Cascade/Other/CLSegmentedView.h#L67 it starts to work correctly. Seems like the +Extension does not override readonly attribute. Adding readwrite to https://github.com/appunite/CLCascade/blob/master/src/Cascade/Other/CLSegmentedView%2BExtension.h#L12 does not help so it seems that removing readonly is the only way to solve the problem.

1am avatar Apr 11 '12 13:04 1am