Comments (20)
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 :)
from bohr.
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?
from bohr.
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.
from bohr.
Good to hear your thoughts about this. I'll start working on v3 then :)
from bohr.
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 :)
from bohr.
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];
from bohr.
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 :)
from bohr.
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 π
from bohr.
I'll gladly implement it for alpha 2 then π
from bohr.
Hey! I just released alpha 2. BOTableViewController
should now be attachable as a class to storyboards' UITableViewController
s.
from bohr.
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:
Aug 29 16:47:39 BohrDemo[50912] <Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. Aug 29 16:47:39 BohrDemo[50912] <Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. Aug 29 16:47:39 BohrDemo[50912] <Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
but the demo app itself works perfectly fine.
from bohr.
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?
from bohr.
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.
from bohr.
Ok we have a few problems then. Let me install Xcode 7 myself and check out what's happening.
from bohr.
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?
from bohr.
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.
from bohr.
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
from bohr.
Alpha 4 is now up. Check it out. I think layout issues must be mostly gone π
from bohr.
Great! Thank you, now I don't experience any layout issues at all :)
from bohr.
Cool! I'm closing this now π
Let me know if you run into any other issue.
from bohr.
Related Issues (20)
- Can't set UISwitch on property HOT 1
- Swifty Bohr HOT 3
- ValueDidChange in BOSetting HOT 2
- BOStepperTableViewCell.h missing HOT 1
- Small Animation Issue HOT 3
- Adding an image to the cell HOT 2
- Add support for disabling / enabling a cell. HOT 1
- Add an option to change the BOTableViewSection appearance HOT 1
- [self bo_setFont:font] β -[__NSCFNumber length]: unrecognized selector HOT 2
- change cell text - question HOT 6
- Valid number of numberOfDecimals not working HOT 3
- change the font of sections and cells HOT 1
- title disappear after click on BOButtonTableViewCell HOT 2
- accessing text values of all cells HOT 2
- Label and Text fields are not properly aligned
- my friend, i need one cell with image at the right side to show the user's avatarοΌhow should i do it ??
- Using pod version 1.1.1 Bohr.h header has path issues
- Cell with icon on the left side
- BOChoiceTableViewCell has no member optionValues
- Method possibly missing a [super awakeFromNib] call
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bohr.