Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23691] iOS: Expose statusBarBackgroundColor #8162

Merged
merged 2 commits into from Jul 29, 2016

Conversation

kopiro
Copy link
Contributor

@kopiro kopiro commented Jul 27, 2016

@build
Copy link
Contributor

build commented Jul 27, 2016

Can one of the admins verify this patch?

@kopiro kopiro changed the title Added statusBarBackgroundColor [AC-4253] Added statusBarBackgroundColor Jul 27, 2016
@hansemannn hansemannn changed the title [AC-4253] Added statusBarBackgroundColor [TIMOB-23691] iOS: Expose statusBarBackgroundColor Jul 27, 2016
@hansemannn hansemannn added this to the 6.1.0 milestone Jul 27, 2016
TiColor* newColor = [TiUtils colorValue:color];
statusbarBg.backgroundColor = [newColor _color];
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if that's the best way to go. I like the style proposed here: http://stackoverflow.com/a/34658477/5537752

Also, statusbarBg should be released from memory every time it is set again, as well as in the dealloc method to clean it from memory after the gets GC'd.

Please try the above-mentioned way to do it.

@kopiro
Copy link
Contributor Author

kopiro commented Jul 27, 2016

@hansemannn Wow, thank you!
It works like a charm.

Pushed ;)

@hansemannn
Copy link
Collaborator

Happy to hear. One thing that concerns me is, that we can set the statusBarBackgroundColor in every Ti.UI.Window context but it is set globally. So either we place it in Ti.UI instead or find a way to make it window-depending.

@hansemannn
Copy link
Collaborator

And remove NSString *color = [TiUtils stringValue:colorString]; + replace it with ENSURE_SINGLE_ARG(value, NSString). Name it value as well.

@kopiro
Copy link
Contributor Author

kopiro commented Jul 27, 2016

Mmm, theoretically we can just call the setBackground... on every Window open.

@hansemannn
Copy link
Collaborator

Right. Then please move it to Ti.UI and let the user decide how to handle it. Guess that keeps it the most flexible for both use-cases (global- and context-based).

@kopiro
Copy link
Contributor Author

kopiro commented Jul 28, 2016

Hi @hansemannn, I thought about, could be better to move to Ti.UI.iOS instead?

@hansemannn
Copy link
Collaborator

hansemannn commented Jul 28, 2016

Excellent idea! Now please restore the TiUIWindowProxy.m with the original one- and place the docs in apidoc/Titanium/UI/iOS/iOS.yml (should be the one).

@hansemannn hansemannn modified the milestones: 6.0.0, 6.1.0 Jul 28, 2016
@hansemannn
Copy link
Collaborator

Can you please pull from master? Cloning your PR locally includes old stuff like the manual scons-scripts.

@hansemannn
Copy link
Collaborator

Approved!

@hansemannn hansemannn merged commit 8e655ce into tidev:master Jul 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants