-
Notifications
You must be signed in to change notification settings - Fork 83
Support for long cell titles #8
Comments
That is definitely on my checklist. The thing is it's pretty tricky due to some Autolayout needs in certain cells. But yeah, I'm on working on it :) |
So I've been trying to make it work but seems like storyboard's UITableViewControllers aren't quite ready for this kind of business. I'll keep trying, but the idea of dropping storyboard support and make it all programmatic is growing in me. It's just much cleaner + allows for this kind of stuff. What's your opinion on this? |
Sorry for a late reply. I believe you're right. Dropping storyboard support indeed gives more freedom. There is a nice example of using a programmatic approach in a similar field. For instance, here's the way you can describe form fields in FXForms: - (NSArray *)fields
{
return @[
@{FXFormFieldKey: @"email", FXFormFieldTitle: @"Email Address"},
...other fields...
];
} I guess Bohr could benefit from using a similar approach by describing settings in code. |
Good to hear your thoughts about this. I'll start working on v3 then :) |
Hey there @Davvie! I just pushed v3.0.0 alpha 1 and I'd like it if you gave it a try. I'm pretty positive this bug is now gone since the nasty Autolayout hack is now longer necessary :) |
Great to hear version 3 is out! I tried to set it up but it doesn't seem to work at all :( I guess, you've dropped Storyboard support. So I tried to do everything in code but I'm surely doing something wrong. I've got a view controller which is a subclass of BOTableViewController. It is assigned to a storyboard scene. The first and major problem is that setup() is never called. That's how I tried to add settings to Bohr: BOTableViewSection *basicSettings = [[BOTableViewSection alloc] init];
BOSwitchTableViewCell *autoLoginCell = [[BOSwitchTableViewCell alloc] init];
autoLoginCell.textLabel.text = @"Automatic login";
autoLoginCell.key = @"Settings_AutoLogin";
BOSwitchTableViewCell *episodePriorityCell = [[BOSwitchTableViewCell alloc] init];
episodePriorityCell.textLabel.text = @"Show new episodes first";
episodePriorityCell.key = @"Settings_NewOnTop";
[basicSettings addCell:autoLoginCell];
[basicSettings addCell:episodePriorityCell];
[self addSection:basicSettings]; |
Yeah storyboard support is completely dropped, meaning not even assigning a subclass to a UITableViewController in a storyboard will work. I could include that little feature in next alpha if storyboards are really that mandatory. Please try running the demo project on Xcode 7 :) |
Aaah, I see. Well, in my current app I have a few buttons that initiate a storyboard segue. So having this little feature would be handy for me to migrate from v2 to v3 :) But I think in my future projects I will anyway do everything settings-related just in code so it will be more extensible in the long run. Plus, sometimes it takes forever for Xcode to launch Interface Builder if the storyboard is complex. I'm going to install Xcode 7 tomorrow, so I'll write back once I try it out 👌 |
I'll gladly implement it for alpha 2 then 😄 |
Hey! I just released alpha 2. |
Yay! Thank you for the Storyboard support, I've just moved to v3, so far so great :) While running the demo project in Xcode 7 I encountered a few runtime error messages in the console:
but the demo app itself works perfectly fine. |
Hmm, that simulator screen is pretty weird. The text cell and footer title's font are bigger than they should be. Was it you who modified such values or is it a bug? |
Oh, it does look weird. Haven't noticed it when I first took the screenshot. No, I didn't change anything code-wise, just ran the project as it is. |
Ok we have a few problems then. Let me install Xcode 7 myself and check out what's happening. |
I've checked it out and seems like the problem with the text cell isn't ocurring for me, although footers are indeed displayed with a huge font size too. I'll work on that. Do you see the text cell with the height displayed on the screenshot right when opening the app, or is it reproducible? |
Just tried again, I can't seem to reproduce it. Tapped at all possible buttons and switches but everything's okay anyway. Btw, noticed one minor issue while running in my current app (with Storyboard). If you start scrolling or changing settings the cells begin to resize (sometimes quite noticeably). But it happens only once. |
Seems like there are some other iOS 9-related problems. Here's what happened when I tried to run my app: https://vid.me/Qx57 |
Alpha 4 is now up. Check it out. I think layout issues must be mostly gone 😄 |
Great! Thank you, now I don't experience any layout issues at all :) |
Cool! I'm closing this now 🎉 Let me know if you run into any other issue. |
Bohr is great. But with the support (automatic resizing) of long cell titles it would become even better.
The text was updated successfully, but these errors were encountered: