RATreeView icon indicating copy to clipboard operation
RATreeView copied to clipboard

[FIX] Fixing "Control may reach end of non-void function"

Open El-Moatasem opened this issue 6 years ago • 1 comments

Hi Sir,

Hope you are doing well

I fixed the error "Control may reach end of non-void function" as it has no default return value as indicated in xcode 11.2.1 Could you accept the merge request ?

Thanks

El-Moatasem avatar Dec 10 '19 14:12 El-Moatasem

While this does make the compiler stop complaining, I'm wondering if this will actually fix the underlying issue -- best I can tell, the problem is because UITableViewStyleInsetGrouped was added to the UITableViewStyle enumeration.

I don't know much about it, but this looked like when it was introduced: https://www.swiftjectivec.com/ios-13-notable-uikit-additions/

In your change, the RATreeViewStyle returned for that UITableViewStyle will be RATreeViewStylePlain, and I'm not sure that's a good default case.

The new InsetGrouped view is also never handled by (UITableViewStyle)tableViewStyleForTreeViewStyle:(RATreeViewStyle)treeViewStyle in this PR.

Your changes fixes the compiler error, yes -- but it doesn't solve adding InsetGrouped support, which I think is the larger issue.

cherron-aptera avatar Jan 02 '20 17:01 cherron-aptera