Skip to content

Commit

Permalink
Merge pull request #5442 from vishalduggal/timob-16594
Browse files Browse the repository at this point in the history
[TIMOB-16594] iOS: Refresh Control crash on stringify
  • Loading branch information
srahim committed Mar 17, 2014
2 parents 96bf358 + ac87e5e commit 310de5f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
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

0 comments on commit 310de5f

Please sign in to comment.