mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
make use of Obj-C's modern syntax for literals and subscripting
This commit is contained in:
@@ -243,7 +243,7 @@
|
||||
// create programmatically each label
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
|
||||
label.text = [sectionTitles objectAtIndex:index];
|
||||
label.text = sectionTitles[index];
|
||||
label.font = [UIFont systemFontOfSize:17];
|
||||
label.textAlignment = NSTextAlignmentCenter;
|
||||
label.textColor = _sectionHeaderTintColor;
|
||||
@@ -263,7 +263,7 @@
|
||||
leftConstraint = [NSLayoutConstraint constraintWithItem:label
|
||||
attribute:NSLayoutAttributeLeading
|
||||
relatedBy:NSLayoutRelationEqual
|
||||
toItem:[labels objectAtIndex:(index-1)]
|
||||
toItem:labels[index - 1]
|
||||
attribute:NSLayoutAttributeTrailing
|
||||
multiplier:1.0
|
||||
constant:0];
|
||||
@@ -339,7 +339,7 @@
|
||||
leftMarkerViewConstraint = [NSLayoutConstraint constraintWithItem:selectedMarkerView
|
||||
attribute:NSLayoutAttributeLeading
|
||||
relatedBy:NSLayoutRelationEqual
|
||||
toItem:[sectionLabels objectAtIndex:_selectedIndex]
|
||||
toItem:sectionLabels[_selectedIndex]
|
||||
attribute:NSLayoutAttributeLeading
|
||||
multiplier:1.0
|
||||
constant:0];
|
||||
@@ -386,7 +386,7 @@
|
||||
|
||||
if (index != NSNotFound)
|
||||
{
|
||||
UILabel* label = [sectionLabels objectAtIndex:index];
|
||||
UILabel* label = sectionLabels[index];
|
||||
label.font = [UIFont systemFontOfSize:17];
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
[NSLayoutConstraint deactivateConstraints:@[displayedVCTopConstraint, displayedVCLeftConstraint, displayedVCWidthConstraint, displayedVCHeightConstraint]];
|
||||
}
|
||||
|
||||
UILabel* label = [sectionLabels objectAtIndex:_selectedIndex];
|
||||
UILabel* label = sectionLabels[_selectedIndex];
|
||||
label.font = [UIFont boldSystemFontOfSize:17];
|
||||
|
||||
// update the marker view position
|
||||
@@ -407,7 +407,7 @@
|
||||
leftMarkerViewConstraint = [NSLayoutConstraint constraintWithItem:selectedMarkerView
|
||||
attribute:NSLayoutAttributeLeading
|
||||
relatedBy:NSLayoutRelationEqual
|
||||
toItem:[sectionLabels objectAtIndex:_selectedIndex]
|
||||
toItem:sectionLabels[_selectedIndex]
|
||||
attribute:NSLayoutAttributeLeading
|
||||
multiplier:1.0
|
||||
constant:0];
|
||||
@@ -415,7 +415,7 @@
|
||||
[NSLayoutConstraint activateConstraints:@[leftMarkerViewConstraint]];
|
||||
|
||||
// Set the new selected view controller
|
||||
_selectedViewController = [viewControllers objectAtIndex:_selectedIndex];
|
||||
_selectedViewController = viewControllers[_selectedIndex];
|
||||
|
||||
// Make iOS invoke selectedViewController viewWillAppear when the segmented view is already visible
|
||||
if (isViewAppeared)
|
||||
|
||||
Reference in New Issue
Block a user