[ios] Pre-c++11 compatibility fixes

This commit is contained in:
Alex Zolotarev 2014-08-06 20:10:45 +03:00 committed by Alex Zolotarev
parent 4138060705
commit 8cd0df8f84
5 changed files with 9 additions and 8 deletions

View file

@ -10,7 +10,7 @@
{
_bmName = [[UILabel alloc] init];
_bmDistance = [[UILabel alloc] init];
_bmDistance.textAlignment = UITextAlignmentRight;
_bmDistance.textAlignment = NSTextAlignmentRight;
// There is a hack below to get standart fonts and colors.
self.textLabel.text = @"tmpText";

View file

@ -51,8 +51,8 @@
bool const showDetailedHint = !GetFramework().GetBmCategoriesCount();
label.text = showDetailedHint ? NSLocalizedString(@"bookmarks_usage_hint", nil)
: NSLocalizedString(@"bookmarks_usage_hint_import_only", nil);
label.textAlignment = UITextAlignmentCenter;
label.lineBreakMode = UILineBreakModeWordWrap;
label.textAlignment = NSTextAlignmentCenter;
label.lineBreakMode = NSLineBreakByWordWrapping;
label.numberOfLines = 0;
[m_hint addSubview:label];
}

View file

@ -120,7 +120,7 @@
f.returnKeyType = UIReturnKeyDone;
f.clearButtonMode = UITextFieldViewModeWhileEditing;
f.autocorrectionType = UITextAutocorrectionTypeNo;
f.textAlignment = UITextAlignmentRight;
f.textAlignment = NSTextAlignmentRight;
f.textColor = cell.detailTextLabel.textColor;
f.font = [cell.detailTextLabel.font fontWithSize:[cell.detailTextLabel.font pointSize]];
f.tag = TEXTFIELD_TAG;
@ -205,7 +205,7 @@
if (!cell)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BookmarksExportCell"];
cell.textLabel.textAlignment = UITextAlignmentCenter;
cell.textLabel.textAlignment = NSTextAlignmentCenter;
cell.textLabel.text = NSLocalizedString(@"share_by_email", nil);
}
}

View file

@ -214,7 +214,7 @@ using namespace::storage;
{
if ([[AppInfo sharedInfo] featureAvailable:AppFeatureMoreAppsBanner])
{
self.bannerView.currentContentSizeIdentifier = UIDeviceOrientationIsPortrait(self.interfaceOrientation) ? ADBannerContentSizeIdentifierPortrait : ADBannerContentSizeIdentifierLandscape;
self.bannerView.currentContentSizeIdentifier = UIInterfaceOrientationIsPortrait(self.interfaceOrientation) ? ADBannerContentSizeIdentifierPortrait : ADBannerContentSizeIdentifierLandscape;
[self updateData];
[self.tableView reloadData];
}
@ -237,7 +237,7 @@ using namespace::storage;
if (!_bannerView)
{
_bannerView = [[ADBannerView alloc] initWithFrame:CGRectZero];
_bannerView.currentContentSizeIdentifier = UIDeviceOrientationIsPortrait(self.interfaceOrientation) ? ADBannerContentSizeIdentifierPortrait : ADBannerContentSizeIdentifierLandscape;
_bannerView.currentContentSizeIdentifier = UIInterfaceOrientationIsPortrait(self.interfaceOrientation) ? ADBannerContentSizeIdentifierPortrait : ADBannerContentSizeIdentifierLandscape;
_bannerView.delegate = self;
}
return _bannerView;

View file

@ -21,6 +21,7 @@ typedef NS_ENUM(NSUInteger, CellRow)
CellRowInfo,
CellRowShare,
CellRowRouting,
CellInvalid // Sections changed but rows are not
};
@interface PlacePageView () <UIGestureRecognizerDelegate, UITableViewDataSource, UITableViewDelegate, PlacePageShareCellDelegate, PlacePageInfoCellDelegate, ColorPickerDelegate, UIAlertViewDelegate, PlacePageRoutingCellDelegate>
@ -171,7 +172,7 @@ typedef NS_ENUM(NSUInteger, CellRow)
return CellRowShare;
else if (indexPath.row == 4)
return CellRowRouting;
return 0;
return CellInvalid;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section