diff --git a/TOSegmentedControl/TOSegmentedControl.h b/TOSegmentedControl/TOSegmentedControl.h index 55b4d26..ce3c80b 100644 --- a/TOSegmentedControl/TOSegmentedControl.h +++ b/TOSegmentedControl/TOSegmentedControl.h @@ -25,169 +25,146 @@ NS_ASSUME_NONNULL_BEGIN -/** - A UI control that presents several - options to the user in a horizontal, segmented layout. - - Only one segment may be selected at a time and, if desired, - may be designated as 'reversible' with an arrow icon indicating - its direction. - */ - +/// A special value where the corner radius will automatically round into the capsule shape. +FOUNDATION_EXPORT const CGFloat TOSegmentendControlCapsuleCornerRadius; + +/// A UI control that presents several +/// options to the user in a horizontal, segmented layout. +/// +/// Only one segment may be selected at a time and, if desired, +/// may be designated as 'reversible' with an arrow icon indicating +/// its direction. NS_SWIFT_NAME(SegmentedControl) IB_DESIGNABLE @interface TOSegmentedControl : UIControl -/** The items currently assigned to this segmented control. (Can be a combination of strings and images) */ +/// The items currently assigned to this segmented control. (Can be a combination of strings and images) @property (nonatomic, copy, nullable) NSArray *items; -/** A block that is called whenever a segment is tapped. */ +/// A block that is called whenever a segment is tapped. @property (nonatomic, copy) void (^segmentTappedHandler)(NSInteger segmentIndex, BOOL reversed); -/** The number of segments this segmented control has. */ +/// The number of segments this segmented control has. @property (nonatomic, readonly) NSInteger numberOfSegments; -/** The index of the currently segment. (May be manually set) */ +/// The index of the currently segment. (May be manually set) @property (nonatomic, assign) NSInteger selectedSegmentIndex; -/** Whether the selected segment is also reveresed. */ +/// Whether the selected segment is also reveresed. @property (nonatomic, assign) BOOL selectedSegmentReversed; -/** The index values of all of the segments that are reversible. */ +/// The index values of all of the segments that are reversible. @property (nonatomic, strong) NSArray *reversibleSegmentIndexes; -/** The amount of rounding in the corners (Default is 9.0f) */ +/// The amount of rounding in the corners (Default is 8.0f up to iOS 18, and the capsule radius on iOS 26) @property (nonatomic, assign) IBInspectable CGFloat cornerRadius; -/** Set the background color of the track in the segmented control (Default is light grey) */ +/// Set the background color of the track in the segmented control (Default is light grey) @property (nonatomic, strong, null_resettable) IBInspectable UIColor *backgroundColor; -/** Set the color of the thumb view. (Default is white) */ +/// Set the color of the thumb view. (Default is white) @property (nonatomic, strong, null_resettable) IBInspectable UIColor *thumbColor; -/** Set the color of the separator lines between each item. (Default is dark grey) */ +/// Set the color of the separator lines between each item. (Default is dark grey) @property (nonatomic, strong, null_resettable) IBInspectable UIColor *separatorColor; -/** The color of the text labels / images (Default is black) */ +/// The color of the text labels / images (Default is black) @property (nonatomic, strong, null_resettable) IBInspectable UIColor *itemColor; -/** The color of the selected labels / images (Default is black) */ +/// The color of the selected labels / images (Default is black) @property (nonatomic, strong, null_resettable) IBInspectable UIColor *selectedItemColor; -/** The font of the text items (Default is system default at 10 points) */ +/// The font of the text items (Default is system default at 10 points) @property (nonatomic, strong, null_resettable) IBInspectable UIFont *textFont; -/** The font of the text item when it's been selected (Default is bold system default 10) */ +/// The font of the text item when it's been selected (Default is bold system default 10) @property (nonatomic, strong, null_resettable) IBInspectable UIFont *selectedTextFont; -/** The amount of insetting the thumb view is from the edge of the track (Default is 2.0f) */ +/// The amount of insetting the thumb view is from the edge of the track (Default is 2.0f) @property (nonatomic, assign) IBInspectable CGFloat thumbInset; -/** The opacity of the shadow surrounding the thumb view*/ +/// The opacity of the shadow surrounding the thumb view @property (nonatomic, assign) IBInspectable CGFloat thumbShadowOpacity; -/** The vertical offset of the shadow */ +/// The vertical offset of the shadow */ @property (nonatomic, assign) IBInspectable CGFloat thumbShadowOffset; -/** The radius of the shadow */ +/// The radius of the shadow @property (nonatomic, assign) IBInspectable CGFloat thumbShadowRadius; -/** - Creates a new segmented control with the provided items. - - @param items An array of either images, or strings to display -*/ +/// Creates a new segmented control with the provided items. +/// +/// @param items An array of either images, or strings to display - (instancetype)initWithItems:(nullable NSArray *)items NS_SWIFT_NAME(init(items:)); -/** - Replaces the content of an existing segment with a new image. - @param image The image to set. - @param index The index of the segment to set. -*/ +/// Replaces the content of an existing segment with a new image. +/// +/// @param image The image to set. +/// @param index The index of the segment to set. - (void)setImage:(UIImage *)image forSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(set(_:forSegmentAt:)); -/** - Replaces the content of an existing segment with a new image, - and optionally makes it reversible. - - @param image The image to set. - @param reversible Whether the item can be tapped multiple times to flip directions. - @param index The index of the segment to set. -*/ +/// Replaces the content of an existing segment with a new image, +/// and optionally makes it reversible. +/// +/// @param image The image to set. +/// @param reversible Whether the item can be tapped multiple times to flip directions. +/// @param index The index of the segment to set. - (void)setImage:(UIImage *)image reversible:(BOOL)reversible forSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(set(_:reversible:forSegmentAt:)); -/** - Returns the image that was assigned to a specific segment. - Will return nil if the content at that segment is not an image. - - @param index The index at which the image is located. -*/ +/// Returns the image that was assigned to a specific segment. +/// Will return nil if the content at that segment is not an image. +/// +/// @param index The index at which the image is located. - (nullable UIImage *)imageForSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(image(forSegmentAt:)); -/** - Sets the content of a given segment to a text label. - - @param title The text to display at the segment. - @param index The index of the segment to set. -*/ +/// Sets the content of a given segment to a text label. +/// +/// @param title The text to display at the segment. +/// @param index The index of the segment to set. - (void)setTitle:(NSString *)title forSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(set(_:forSegmentAt:)); -/** - Sets the content of a given segment to a text label, and - optionally makes it reversible. - - @param title The text to display at the segment. - @param reversible Whether the item can be tapped multiple times to flip directions. - @param index The index of the segment to set. -*/ +/// Sets the content of a given segment to a text label, and +/// optionally makes it reversible. +/// +/// @param title The text to display at the segment. +/// @param reversible Whether the item can be tapped multiple times to flip directions. +/// @param index The index of the segment to set. - (void)setTitle:(NSString *)title reversible:(BOOL)reversible forSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(set(_:reversible:forSegmentAt:)); -/** - Returns the string of the title that was assigned to a specific segment. - Will return nil if the content at that segment is not a string. - - @param index The index at which the image is located. -*/ +/// Returns the string of the title that was assigned to a specific segment. +/// Will return nil if the content at that segment is not a string. +/// +/// @param index The index at which the image is located. - (nullable NSString *)titleForSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(titleForSegment(for:)); -/** - Adds a new text segment to the end of the list. - - @param title The title of the new item. -*/ +/// Adds a new text segment to the end of the list. +/// +/// @param title The title of the new item. - (void)addSegmentWithTitle:(NSString *)title NS_SWIFT_NAME(addSegment(withTitle:)); -/** - Adds a new text segment to the end of the list, and optionally makes it reversible. - - @param title The title of the new item. - @param reversible Whether the item is reversible or not. -*/ +/// Adds a new text segment to the end of the list, and optionally makes it reversible. +/// +/// @param title The title of the new item. +/// @param reversible Whether the item is reversible or not. - (void)addSegmentWithTitle:(NSString *)title reversible:(BOOL)reversible NS_SWIFT_NAME(addSegment(withTitle:reversible:)); -/** - Adds a new image segment to the end of the list. - - @param image The image of the new item. -*/ +/// Adds a new image segment to the end of the list. +/// +/// @param image The image of the new item. - (void)addSegmentWithImage:(UIImage *)image NS_SWIFT_NAME(addSegment(with:)); -/** - Adds a new image segment to the end of the list, and optionally makes it reversible. - - @param image The image of the new item. - @param reversible Whether the item is reversible or not. -*/ +/// Adds a new image segment to the end of the list, and optionally makes it reversible. +/// +/// @param image The image of the new item. +/// @param reversible Whether the item is reversible or not. - (void)addSegmentWithImage:(UIImage *)image reversible:(BOOL)reversible NS_SWIFT_NAME(addSegment(with:reversible:)); -/** - Inserts a new image segment at the specified index. - - @param image The image to set. - @param index The index of the segment to which the image will be set. -*/ +/// Inserts a new image segment at the specified index. +/// +/// @param image The image to set. +/// @param index The index of the segment to which the image will be set. - (void)insertSegmentWithImage:(UIImage *)image atIndex:(NSInteger)index NS_SWIFT_NAME(insertSegment(with:at:)); /** @@ -200,92 +177,68 @@ IB_DESIGNABLE @interface TOSegmentedControl : UIControl - (void)insertSegmentWithImage:(UIImage *)image reversible:(BOOL)reversible atIndex:(NSInteger)index NS_SWIFT_NAME(insertSegment(with:reversible:at:)); -/** - Inserts a new title segment at the specified index. - - @param title The title to set. - @param index The index of the segment to which the image will be set. -*/ +/// Inserts a new title segment at the specified index. +/// +/// @param title The title to set. +/// @param index The index of the segment to which the image will be set. - (void)insertSegmentWithTitle:(NSString *)title atIndex:(NSInteger)index NS_SWIFT_NAME(insertSegment(withTitle:at:)); -/** - Inserts a new title segment at the specified index, and optionally makes it reversible. - - @param title The title to set. - @param reversible Whether the item is reversible or not. - @param index The index of the segment to which the image will be set. -*/ +/// Inserts a new title segment at the specified index, and optionally makes it reversible. +/// +/// @param title The title to set. +/// @param reversible Whether the item is reversible or not. +/// @param index The index of the segment to which the image will be set. - (void)insertSegmentWithTitle:(NSString *)title reversible:(BOOL)reversible atIndex:(NSInteger)index NS_SWIFT_NAME(insertSegment(withTitle:reversible:at:)); -/** - Remove the last segment in the list -*/ +/// Remove the last segment in the list - (void)removeLastSegment NS_SWIFT_NAME(removeLastSegment()); -/** - Removes the segment at the specified index. - - @param index The index of the segment to remove. -*/ +/// Removes the segment at the specified index. +/// +/// @param index The index of the segment to remove. - (void)removeSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(removeSegment(at:)); -/** - Removes all of the items from this control. -*/ +/// Removes all of the items from this control. - (void)removeAllSegments NS_SWIFT_NAME(removeAllSegments()); -/** - Enables or disables the segment at the specified index. - - @param enabled Whether the segment is enabled or not. - @param index The specific index to enable/disable. -*/ +/// Enables or disables the segment at the specified index. +/// +/// @param enabled Whether the segment is enabled or not. +/// @param index The specific index to enable/disable. - (void)setEnabled:(BOOL)enabled forSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(setEnabled(_:forSegmentAt:)); -/** - Returns whether the segment at the specified index is currently enabled or not. - - @param index The index to check. -*/ +/// Returns whether the segment at the specified index is currently enabled or not. +/// +/// @param index The index to check. - (BOOL)isEnabledForSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(isEnabledForSegment(at:)); -/** - Sets whether a specific segment is currently reversible or not. - - @param reversible Whether the segment is reversible or not. - @param index The specific index to enable/disable. -*/ +/// Sets whether a specific segment is currently reversible or not. +/// +/// @param reversible Whether the segment is reversible or not. +/// @param index The specific index to enable/disable. - (void)setReversible:(BOOL)reversible forSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(setReversible(_:forSegmentAt:)); -/** - Returns whether the segment at the specified index is reversible or not. - - @param index The index to check. -*/ +/// Returns whether the segment at the specified index is reversible or not. +/// +/// @param index The index to check. - (BOOL)isReversibleForSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(isReversibleForSegment(at:)); -/** - Sets whether a specific segment is currently in a reversed state or not. - - @param reversed Whether the segment is currently reversed or not. - @param index The specific index to enable/disable. -*/ +/// Sets whether a specific segment is currently in a reversed state or not. +/// +/// @param reversed Whether the segment is currently reversed or not. +/// @param index The specific index to enable/disable. - (void)setReversed:(BOOL)reversed forSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(setReversed(_:forSegmentAt:)); -/** - Returns whether the segment at the specified index is currently reversed or not. - - @param index The index to check. -*/ +/// Returns whether the segment at the specified index is currently reversed or not. +/// +/// @param index The index to check. - (BOOL)isReversedForSegmentAtIndex:(NSInteger)index NS_SWIFT_NAME(isReversed(at:)); -/** - Sets which segment is currently selected, and optionally play an animation during the transition. - - @param selectedSegmentIndex The index of the segment to select. - @param animated Whether the transition to the newly selected index is animated or not. -*/ +/// Sets which segment is currently selected, and optionally play an animation during the transition. +/// +/// @param selectedSegmentIndex The index of the segment to select. +/// @param animated Whether the transition to the newly selected index is animated or not. - (void)setSelectedSegmentIndex:(NSInteger)selectedSegmentIndex animated:(BOOL)animated NS_SWIFT_NAME(setSelectedSegmentIndex(_:animated:)); @end diff --git a/TOSegmentedControl/TOSegmentedControl.m b/TOSegmentedControl/TOSegmentedControl.m index fbaab03..517e166 100644 --- a/TOSegmentedControl/TOSegmentedControl.m +++ b/TOSegmentedControl/TOSegmentedControl.m @@ -24,11 +24,17 @@ #import "TOSegmentedControlSegment.h" // ---------------------------------------------------------------- -// Static Members +// Global members // A cache to hold images generated for this view that may be shared. static NSMapTable *_imageTable = nil; +// A magic value used to indicate the rounding should be automatically based off height. +const CGFloat TOSegmentendControlCapsuleCornerRadius = -1.0f; + +// ---------------------------------------------------------------- +// Internal Members + // Statically referenced key names for the images stored in the map table. static NSString * const kTOSegmentedControlArrowImage = @"arrowIcon"; static NSString * const kTOSegmentedControlSeparatorImage = @"separatorImage"; @@ -167,12 +173,17 @@ - (void)commonInit // Set default values self.selectedSegmentIndex = -1; - self.cornerRadius = 8.0f; self.thumbInset = 2.0f; self.thumbShadowRadius = 3.0f; self.thumbShadowOffset = 2.0f; self.thumbShadowOpacity = 0.13f; + if (@available(iOS 26.0, *)) { + self.cornerRadius = TOSegmentendControlCapsuleCornerRadius; + } else { + self.cornerRadius = 8.0f; + } + // Set focused index to -1 to indicate nothing is focused self.focusedIndex = -1; @@ -522,7 +533,7 @@ - (void)layoutThumbView // Match the shadow path to the new size of the thumb view CGPathRef oldShadowPath = self.thumbView.layer.shadowPath; UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRoundedRect:(CGRect){CGPointZero, frame.size} - cornerRadius:self.cornerRadius - self.thumbInset]; + cornerRadius:[self _cornerRadiusValue] - self.thumbInset]; // If the segmented control is animating its shape, to prevent the // shadow from visibly snapping, perform a resize animation on it @@ -596,13 +607,13 @@ - (void)layoutSeparatorViews CGFloat xOffset = (_thumbInset + segmentWidth) - 1.0f; NSInteger i = 0; for (UIView *separatorView in self.separatorViews) { - CGRect frame = separatorView.frame; - frame.size.width = 1.0f; - frame.size.height = (size.height - (self.cornerRadius) * 2.0f) + 2.0f; - frame.origin.x = xOffset + (segmentWidth * i); - frame.origin.y = (size.height - frame.size.height) * 0.5f; - separatorView.frame = CGRectIntegral(frame); - i++; + CGRect frame = separatorView.frame; + frame.size.width = 1.0f; + frame.size.height = self.textFont.lineHeight; + frame.origin.x = xOffset + (segmentWidth * i); + frame.origin.y = (size.height - frame.size.height) * 0.5f; + separatorView.frame = CGRectIntegral(frame); + i++; } // Update the alpha of the separator views @@ -1244,11 +1255,26 @@ - (void)setItems:(NSArray *)items - (void)setCornerRadius:(CGFloat)cornerRadius { - self.trackView.layer.cornerRadius = cornerRadius; - self.thumbView.layer.cornerRadius = (self.cornerRadius - _thumbInset) + 1.0f; + if (cornerRadius == _cornerRadius) { + return; + } + + _cornerRadius = cornerRadius; + [self _updateCornerRadius]; +} + +- (CGFloat)_cornerRadiusValue +{ + const BOOL isCapsuleShape = _cornerRadius == TOSegmentendControlCapsuleCornerRadius; + return isCapsuleShape ? CGRectGetHeight(self.trackView.frame) / 2.0f : _cornerRadius; } -- (CGFloat)cornerRadius { return self.trackView.layer.cornerRadius; } +- (void)_updateCornerRadius +{ + const CGFloat cornerRadius = [self _cornerRadiusValue]; + self.trackView.layer.cornerRadius = cornerRadius; + self.thumbView.layer.cornerRadius = (cornerRadius - _thumbInset) + 1.0f; +} // ----------------------------------------------- // Thumb Color @@ -1440,7 +1466,7 @@ - (void)setSelectedTextFont:(UIFont *)selectedTextFont - (void)setThumbInset:(CGFloat)thumbInset { _thumbInset = thumbInset; - self.thumbView.layer.cornerRadius = (self.cornerRadius - _thumbInset) + 1.0f; + self.thumbView.layer.cornerRadius = ([self _cornerRadiusValue] - _thumbInset) + 1.0f; } // ----------------------------------------------- diff --git a/TOSegmentedControlExample.xcodeproj/project.pbxproj b/TOSegmentedControlExample.xcodeproj/project.pbxproj index 2794cd9..d73dfcf 100644 --- a/TOSegmentedControlExample.xcodeproj/project.pbxproj +++ b/TOSegmentedControlExample.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -232,7 +232,8 @@ 22DF8D7D22FF119C0051F319 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1100; + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 2610; ORGANIZATIONNAME = "Tim Oliver"; TargetAttributes = { 228CEE3023289D4E000B055C = { @@ -349,6 +350,7 @@ 228CEE3B23289D4E000B055C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -356,9 +358,10 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; INFOPLIST_FILE = TOSegmentedControlFramework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -366,6 +369,7 @@ ); MACH_O_TYPE = staticlib; MARKETING_VERSION = 0.0.1; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; PRODUCT_BUNDLE_IDENTIFIER = dev.tim.TOSegmentedControlFramework; PRODUCT_NAME = TOSegmentedControl; SKIP_INSTALL = YES; @@ -378,6 +382,7 @@ 228CEE3C23289D4E000B055C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -385,9 +390,10 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; INFOPLIST_FILE = TOSegmentedControlFramework/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -395,6 +401,7 @@ ); MACH_O_TYPE = staticlib; MARKETING_VERSION = 0.0.1; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14"; PRODUCT_BUNDLE_IDENTIFIER = dev.tim.TOSegmentedControlFramework; PRODUCT_NAME = TOSegmentedControl; SKIP_INSTALL = YES; @@ -468,6 +475,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -478,6 +486,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -492,11 +501,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + STRING_CATALOG_GENERATE_SYMBOLS = YES; }; name = Debug; }; @@ -526,6 +536,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -536,6 +547,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -544,10 +556,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; + STRING_CATALOG_GENERATE_SYMBOLS = YES; VALIDATE_PRODUCT = YES; }; name = Release; @@ -559,7 +572,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 6LF3GMKZAB; INFOPLIST_FILE = TOSegmentedControlExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -577,7 +590,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 6LF3GMKZAB; INFOPLIST_FILE = TOSegmentedControlExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/TOSegmentedControlExample.xcodeproj/xcshareddata/xcschemes/TOSegmentedControl.xcscheme b/TOSegmentedControlExample.xcodeproj/xcshareddata/xcschemes/TOSegmentedControl.xcscheme index f2531ba..cab8abc 100644 --- a/TOSegmentedControlExample.xcodeproj/xcshareddata/xcschemes/TOSegmentedControl.xcscheme +++ b/TOSegmentedControlExample.xcodeproj/xcshareddata/xcschemes/TOSegmentedControl.xcscheme @@ -1,6 +1,6 @@ - + - + + @@ -17,10 +18,10 @@ - + - + - + @@ -72,10 +73,10 @@ + - @@ -88,7 +89,7 @@ - + @@ -105,7 +106,8 @@ - + + @@ -120,7 +122,6 @@ - @@ -134,4 +135,9 @@ + + + + +