Fix some warnings in React.xcodeproj

Reviewed By: majak

Differential Revision: D4081860

fbshipit-source-id: 4b503df3c4e8b6e06b04613919a4a3405bf01171
This commit is contained in:
Pieter De Baets
2016-10-27 04:17:43 -07:00
committed by Facebook Github Bot
parent 384ea330c8
commit 8bc30af6c8
4 changed files with 29 additions and 29 deletions

View File

@@ -525,8 +525,7 @@ RCT_EXPORT_METHOD(show)
case RCTDevMenuTypeButton: {
[_actionSheet addAction:[UIAlertAction actionWithTitle:item.title
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {
// Cancel button tappped.
handler:^(__unused UIAlertAction *action) {
[item callHandler];
}]];
break;
@@ -535,11 +534,10 @@ RCT_EXPORT_METHOD(show)
BOOL selected = [item.value boolValue];
[_actionSheet addAction:[UIAlertAction actionWithTitle:(selected? item.selectedTitle : item.title)
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {
handler:^(__unused UIAlertAction *action) {
BOOL value = [self->_settings[item.key] boolValue];
[self updateSetting:item.key value:@(!value)]; // will call handler
}]];
break;
}
}
@@ -547,11 +545,10 @@ RCT_EXPORT_METHOD(show)
[_actionSheet addAction:[UIAlertAction actionWithTitle:@"Cancel"
style:UIAlertActionStyleCancel
handler:^(UIAlertAction *action) {
}]];
handler:nil]];
_presentedItems = items;
[RCTPresentedViewController() presentViewController:_actionSheet animated:YES completion:^(void){}];
[RCTPresentedViewController() presentViewController:_actionSheet animated:YES completion:nil];
}

View File

@@ -858,18 +858,21 @@ RCT_EXPORT_METHOD(replaceExistingNonRootView:(nonnull NSNumber *)reactTag
RCTAssert(shadowView != nil, @"shadowView (for ID %@) not found", reactTag);
RCTShadowView *superShadowView = shadowView.superview;
RCTAssert(superShadowView != nil, @"shadowView super (of ID %@) not found", reactTag);
if (!superShadowView) {
RCTAssert(NO, @"shadowView super (of ID %@) not found", reactTag);
return;
}
NSUInteger indexOfView = [superShadowView.reactSubviews indexOfObject:shadowView];
RCTAssert(indexOfView != NSNotFound, @"View's superview doesn't claim it as subview (id %@)", reactTag);
NSArray<NSNumber *> *removeAtIndices = @[@(indexOfView)];
NSArray<NSNumber *> *addTags = @[newReactTag];
[self manageChildren:superShadowView.reactTag
moveFromIndices:nil
moveToIndices:nil
addChildReactTags:addTags
moveFromIndices:nil
moveToIndices:nil
addChildReactTags:addTags
addAtIndices:removeAtIndices
removeAtIndices:removeAtIndices];
removeAtIndices:removeAtIndices];
}
RCT_EXPORT_METHOD(setChildren:(nonnull NSNumber *)containerTag