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-16594] iOS: Refresh Control crash on stringify #5442

Merged
merged 2 commits into from
Mar 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions apidoc/Titanium/App/Android/Android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ properties:
summary: |
The version number of the application.
type: Number
permission: read-only
since: 3.3.0

- name: appVersionName
summary: |
The version name of the application.
type: String
permission: read-only
since: 3.3.0

examples:
Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/TiUIRefreshControlProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@interface TiUIRefreshControlProxy : TiProxy {
UIRefreshControl* _refreshControl;
NSAttributedString* _attributedString;
UIColor* _tintColor;
UIColor* refreshTintColor;
}

#pragma mark - Internal Use Only
Expand Down
8 changes: 4 additions & 4 deletions iphone/Classes/TiUIRefreshControlProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ -(void) dealloc
{
RELEASE_TO_NIL(_refreshControl);
RELEASE_TO_NIL(_attributedString);
RELEASE_TO_NIL(_tintColor);
RELEASE_TO_NIL(refreshTintColor);
[super dealloc];
}

Expand All @@ -43,7 +43,7 @@ -(void)refreshControl
{
if (_refreshControl != nil) {
[_refreshControl setAttributedTitle:_attributedString];
[_refreshControl setTintColor:_tintColor];
[_refreshControl setTintColor:refreshTintColor];
}
}

Expand Down Expand Up @@ -76,8 +76,8 @@ -(void)setTintColor:(id)args
{
ENSURE_SINGLE_ARG_OR_NIL(args, NSObject);
[self replaceValue:args forKey:@"tintColor" notification:NO];
RELEASE_TO_NIL(_tintColor);
_tintColor = [[[TiUtils colorValue:args] color] retain];
RELEASE_TO_NIL(refreshTintColor);
refreshTintColor = [[[TiUtils colorValue:args] color] retain];
//Changing tintColor works on iOS6 but not on iOS7. iOS Bug?
TiThreadPerformOnMainThread(^{
[self refreshControl];
Expand Down