Skip to content
This repository has been archived by the owner on Jul 12, 2019. It is now read-only.

Fix crash on iOS7 devices #9

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions AKSegmentedControl/AKSegmentedControl.m
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ - (void)setButtonsArray:(NSArray *)buttonsArray

_buttonsArray = buttonsArray;

[_buttonsArray enumerateObjectsWithOptions:NSEnumerationConcurrent usingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[self addSubview:(UIButton *)obj];
[_buttonsArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
[self addSubview:(UIButton *)obj];
[(UIButton *)obj addTarget:self action:@selector(segmentButtonPressed:) forControlEvents:UIControlEventTouchDown];
[(UIButton *)obj setTag:idx];
}];
Expand Down