appunite / CLCascade

Twitter-like cascade UI library
http://appunite.com/
Other
504 stars 67 forks source link

CLSegmentedView setViewSize: unrecognized selector sent to instance #29

Open 1am opened 12 years ago

1am commented 12 years ago

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'

emilwojtaszek commented 12 years ago

please check master, i've added CLSegmentedView+Extension

1am commented 12 years ago

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.