diff --git a/iphone/DatePicker/DatePicker.xcodeproj/project.pbxproj b/iphone/DatePicker/DatePicker.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..c138191241 --- /dev/null +++ b/iphone/DatePicker/DatePicker.xcodeproj/project.pbxproj @@ -0,0 +1,404 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 47A13C7724B4A8DF00027D4F /* DatePickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C7624B4A8DF00027D4F /* DatePickerView.swift */; }; + 47A13C7F24B4BA1E00027D4F /* UIView+Align.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C7E24B4BA1E00027D4F /* UIView+Align.swift */; }; + 47A13C8324B4BA6900027D4F /* CalendarHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C8224B4BA6900027D4F /* CalendarHeader.swift */; }; + 47A13C8924B88D7C00027D4F /* CalendarLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C8824B88D7B00027D4F /* CalendarLayout.swift */; }; + 47A13C8C24BCFE3200027D4F /* EmptyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C8B24BCFE3200027D4F /* EmptyCell.swift */; }; + 47A13C8E24BCFE9400027D4F /* InactiveCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C8D24BCFE9400027D4F /* InactiveCell.swift */; }; + 47A13C9024BCFECB00027D4F /* Cell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C8F24BCFECB00027D4F /* Cell.swift */; }; + 47A13C9224BD3E4D00027D4F /* SelectedSingleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C9124BD3E4D00027D4F /* SelectedSingleCell.swift */; }; + 47A13C9424BD3E9600027D4F /* SelectedFirstCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C9324BD3E9600027D4F /* SelectedFirstCell.swift */; }; + 47A13C9624BD3EA500027D4F /* SelectedLastCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C9524BD3EA500027D4F /* SelectedLastCell.swift */; }; + 47A13C9824BD3EFE00027D4F /* RangeSingleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C9724BD3EFE00027D4F /* RangeSingleCell.swift */; }; + 47A13C9A24BD3F1100027D4F /* RangeFirstCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C9924BD3F1100027D4F /* RangeFirstCell.swift */; }; + 47A13C9C24BD3F1E00027D4F /* RangeLastCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C9B24BD3F1E00027D4F /* RangeLastCell.swift */; }; + 47A13C9E24BD3F3400027D4F /* RangeMiddleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C9D24BD3F3400027D4F /* RangeMiddleCell.swift */; }; + 47A13CA024BDEFF400027D4F /* CellStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13C9F24BDEFF400027D4F /* CellStrategy.swift */; }; + 47A13CA224BE6E4B00027D4F /* DatePickerViewTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47A13CA124BE6E4B00027D4F /* DatePickerViewTheme.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 47A13C6524B4A86000027D4F /* DatePicker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DatePicker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 47A13C6924B4A86000027D4F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 47A13C7624B4A8DF00027D4F /* DatePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatePickerView.swift; sourceTree = ""; }; + 47A13C7E24B4BA1E00027D4F /* UIView+Align.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Align.swift"; sourceTree = ""; }; + 47A13C8224B4BA6900027D4F /* CalendarHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarHeader.swift; sourceTree = ""; }; + 47A13C8824B88D7B00027D4F /* CalendarLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarLayout.swift; sourceTree = ""; }; + 47A13C8B24BCFE3200027D4F /* EmptyCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyCell.swift; sourceTree = ""; }; + 47A13C8D24BCFE9400027D4F /* InactiveCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InactiveCell.swift; sourceTree = ""; }; + 47A13C8F24BCFECB00027D4F /* Cell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cell.swift; sourceTree = ""; }; + 47A13C9124BD3E4D00027D4F /* SelectedSingleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectedSingleCell.swift; sourceTree = ""; }; + 47A13C9324BD3E9600027D4F /* SelectedFirstCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectedFirstCell.swift; sourceTree = ""; }; + 47A13C9524BD3EA500027D4F /* SelectedLastCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectedLastCell.swift; sourceTree = ""; }; + 47A13C9724BD3EFE00027D4F /* RangeSingleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RangeSingleCell.swift; sourceTree = ""; }; + 47A13C9924BD3F1100027D4F /* RangeFirstCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RangeFirstCell.swift; sourceTree = ""; }; + 47A13C9B24BD3F1E00027D4F /* RangeLastCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RangeLastCell.swift; sourceTree = ""; }; + 47A13C9D24BD3F3400027D4F /* RangeMiddleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RangeMiddleCell.swift; sourceTree = ""; }; + 47A13C9F24BDEFF400027D4F /* CellStrategy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CellStrategy.swift; sourceTree = ""; }; + 47A13CA124BE6E4B00027D4F /* DatePickerViewTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatePickerViewTheme.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 47A13C6224B4A86000027D4F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 47A13C5B24B4A86000027D4F = { + isa = PBXGroup; + children = ( + 47A13C6724B4A86000027D4F /* DatePicker */, + 47A13C6624B4A86000027D4F /* Products */, + ); + sourceTree = ""; + }; + 47A13C6624B4A86000027D4F /* Products */ = { + isa = PBXGroup; + children = ( + 47A13C6524B4A86000027D4F /* DatePicker.framework */, + ); + name = Products; + sourceTree = ""; + }; + 47A13C6724B4A86000027D4F /* DatePicker */ = { + isa = PBXGroup; + children = ( + 47A13C8A24BCFE1900027D4F /* Cells */, + 47A13C6924B4A86000027D4F /* Info.plist */, + 47A13C7624B4A8DF00027D4F /* DatePickerView.swift */, + 47A13C7E24B4BA1E00027D4F /* UIView+Align.swift */, + 47A13C8224B4BA6900027D4F /* CalendarHeader.swift */, + 47A13C8824B88D7B00027D4F /* CalendarLayout.swift */, + 47A13CA124BE6E4B00027D4F /* DatePickerViewTheme.swift */, + ); + path = DatePicker; + sourceTree = ""; + }; + 47A13C8A24BCFE1900027D4F /* Cells */ = { + isa = PBXGroup; + children = ( + 47A13C8F24BCFECB00027D4F /* Cell.swift */, + 47A13C8B24BCFE3200027D4F /* EmptyCell.swift */, + 47A13C8D24BCFE9400027D4F /* InactiveCell.swift */, + 47A13C9124BD3E4D00027D4F /* SelectedSingleCell.swift */, + 47A13C9324BD3E9600027D4F /* SelectedFirstCell.swift */, + 47A13C9524BD3EA500027D4F /* SelectedLastCell.swift */, + 47A13C9724BD3EFE00027D4F /* RangeSingleCell.swift */, + 47A13C9924BD3F1100027D4F /* RangeFirstCell.swift */, + 47A13C9B24BD3F1E00027D4F /* RangeLastCell.swift */, + 47A13C9D24BD3F3400027D4F /* RangeMiddleCell.swift */, + 47A13C9F24BDEFF400027D4F /* CellStrategy.swift */, + ); + path = Cells; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 47A13C6024B4A86000027D4F /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 47A13C6424B4A86000027D4F /* DatePicker */ = { + isa = PBXNativeTarget; + buildConfigurationList = 47A13C6D24B4A86000027D4F /* Build configuration list for PBXNativeTarget "DatePicker" */; + buildPhases = ( + 47A13C6024B4A86000027D4F /* Headers */, + 47A13C6124B4A86000027D4F /* Sources */, + 47A13C6224B4A86000027D4F /* Frameworks */, + 47A13C6324B4A86000027D4F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = DatePicker; + productName = DatePicker; + productReference = 47A13C6524B4A86000027D4F /* DatePicker.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 47A13C5C24B4A86000027D4F /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1130; + ORGANIZATIONNAME = maps.me; + TargetAttributes = { + 47A13C6424B4A86000027D4F = { + CreatedOnToolsVersion = 11.3; + LastSwiftMigration = 1130; + }; + }; + }; + buildConfigurationList = 47A13C5F24B4A86000027D4F /* Build configuration list for PBXProject "DatePicker" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 47A13C5B24B4A86000027D4F; + productRefGroup = 47A13C6624B4A86000027D4F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 47A13C6424B4A86000027D4F /* DatePicker */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 47A13C6324B4A86000027D4F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 47A13C6124B4A86000027D4F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 47A13CA024BDEFF400027D4F /* CellStrategy.swift in Sources */, + 47A13C7F24B4BA1E00027D4F /* UIView+Align.swift in Sources */, + 47A13C8324B4BA6900027D4F /* CalendarHeader.swift in Sources */, + 47A13C8924B88D7C00027D4F /* CalendarLayout.swift in Sources */, + 47A13C7724B4A8DF00027D4F /* DatePickerView.swift in Sources */, + 47A13C9624BD3EA500027D4F /* SelectedLastCell.swift in Sources */, + 47A13C9024BCFECB00027D4F /* Cell.swift in Sources */, + 47A13C9E24BD3F3400027D4F /* RangeMiddleCell.swift in Sources */, + 47A13C9A24BD3F1100027D4F /* RangeFirstCell.swift in Sources */, + 47A13C9224BD3E4D00027D4F /* SelectedSingleCell.swift in Sources */, + 47A13C9C24BD3F1E00027D4F /* RangeLastCell.swift in Sources */, + 47A13C9424BD3E9600027D4F /* SelectedFirstCell.swift in Sources */, + 47A13C8E24BCFE9400027D4F /* InactiveCell.swift in Sources */, + 47A13C8C24BCFE3200027D4F /* EmptyCell.swift in Sources */, + 47A13CA224BE6E4B00027D4F /* DatePickerViewTheme.swift in Sources */, + 47A13C9824BD3EFE00027D4F /* RangeSingleCell.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 47A13C6B24B4A86000027D4F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 47A13C6C24B4A86000027D4F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 47A13C6E24B4A86000027D4F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 8L2P6RXNG7; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = DatePicker/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.mapswithme.DatePicker; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 47A13C6F24B4A86000027D4F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = 8L2P6RXNG7; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = DatePicker/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.mapswithme.DatePicker; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 47A13C5F24B4A86000027D4F /* Build configuration list for PBXProject "DatePicker" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 47A13C6B24B4A86000027D4F /* Debug */, + 47A13C6C24B4A86000027D4F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 47A13C6D24B4A86000027D4F /* Build configuration list for PBXNativeTarget "DatePicker" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 47A13C6E24B4A86000027D4F /* Debug */, + 47A13C6F24B4A86000027D4F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 47A13C5C24B4A86000027D4F /* Project object */; +} diff --git a/iphone/DatePicker/DatePicker/CalendarHeader.swift b/iphone/DatePicker/DatePicker/CalendarHeader.swift new file mode 100644 index 0000000000..eb7f2a791b --- /dev/null +++ b/iphone/DatePicker/DatePicker/CalendarHeader.swift @@ -0,0 +1,59 @@ +import UIKit + +final class CalendarHeader: UICollectionReusableView { + let monthLabel = UILabel() + let vStack = UIStackView() + let weekdaysStack = UIStackView() + var weekdayLabels: [UILabel] = [] + var theme = DatePickerViewTheme() { + didSet { + updateTheme() + } + } + + private func updateTheme() { + backgroundColor = theme.monthHeaderBackgroundColor + monthLabel.textColor = theme.monthHeaderColor + monthLabel.font = theme.monthHeaderFont + weekdayLabels.forEach { + $0.textColor = theme.weekdaySymbolsColor + $0.font = theme.weekdaySymbolsFont + } + } + + override init(frame: CGRect) { + super.init(frame: frame) + addSubview(vStack) + vStack.alignToSuperview() + vStack.addArrangedSubview(monthLabel) + vStack.addArrangedSubview(weekdaysStack) + for _ in 0..<7 { + let label = UILabel() + label.textAlignment = .center + weekdayLabels.append(label) + weekdaysStack.addArrangedSubview(label) + } + vStack.axis = .vertical + vStack.distribution = .fillEqually + weekdaysStack.axis = .horizontal + weekdaysStack.distribution = .fillEqually + monthLabel.textAlignment = .center + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func prepareForReuse() { + monthLabel.text = nil + } + + func config(_ month: String, weekdays: [String], firstWeekday: Int) { + monthLabel.text = month + for i in 0..<7 { + let index = (i + firstWeekday - 1) % 7 + let label = weekdayLabels[i] + label.text = weekdays[index] + } + } +} diff --git a/iphone/DatePicker/DatePicker/CalendarLayout.swift b/iphone/DatePicker/DatePicker/CalendarLayout.swift new file mode 100644 index 0000000000..db18d33214 --- /dev/null +++ b/iphone/DatePicker/DatePicker/CalendarLayout.swift @@ -0,0 +1,22 @@ +import UIKit + +final class CalendarLayout: UICollectionViewFlowLayout { + override func prepare() { + super.prepare() + + guard let collectionView = collectionView else { return } + let availableWidth = collectionView.bounds.width + minimumLineSpacing = 0 + minimumInteritemSpacing = 0 + let itemWidth = floor(availableWidth / 7) + let spaceLeft = availableWidth - itemWidth * 7 + sectionInset = UIEdgeInsets(top: 0, left: spaceLeft / 2, bottom: 0, right: spaceLeft / 2) + itemSize = CGSize(width: itemWidth, height: itemWidth) + headerReferenceSize = CGSize(width: availableWidth, height: 80) + sectionHeadersPinToVisibleBounds = true + } + + override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool { + true + } +} diff --git a/iphone/DatePicker/DatePicker/Cells/Cell.swift b/iphone/DatePicker/DatePicker/Cells/Cell.swift new file mode 100644 index 0000000000..104a8dc4ac --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/Cell.swift @@ -0,0 +1,36 @@ +import UIKit + +class Cell: UICollectionViewCell { + let label = UILabel() + + var theme = DatePickerViewTheme() { + didSet { + updateTheme() + } + } + + func updateTheme() { + label.textColor = theme.dayColor + label.font = theme.dayFont + } + + override init(frame: CGRect) { + super.init(frame: frame) + addSubviews() + label.textAlignment = .center + updateTheme() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func addSubviews() { + contentView.addSubview(label) + label.alignToSuperview() + } + + override func prepareForReuse() { + label.text = nil + } +} diff --git a/iphone/DatePicker/DatePicker/Cells/CellStrategy.swift b/iphone/DatePicker/DatePicker/Cells/CellStrategy.swift new file mode 100644 index 0000000000..ed4817c5d9 --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/CellStrategy.swift @@ -0,0 +1,85 @@ +import UIKit + +enum PositionInRow { + case outside + case first + case middle + case last + case single +} + +enum PositionInRange { + case inactive + case outside + case first + case middle + case last + case single +} + +final class CellStrategy { + enum CellId: String { + case empty = "empty" + case regular = "regular" + case inactive = "inactive" + case selectedSingle = "selectedSingle" + case selectedFirst = "selectedFirst" + case selectedLast = "selectedLast" + case rangeSingle = "rangeSingle" + case rangeFirst = "rangeFirst" + case rangeMiddle = "rangeMiddle" + case rangeLast = "rangeLast" + } + + weak var collectionView: UICollectionView? + + init(_ collectionView: UICollectionView) { + self.collectionView = collectionView + register(EmptyCell.self, cellId: .empty) + register(Cell.self, cellId: .regular) + register(InactiveCell.self, cellId: .inactive) + register(SelectedSingleCell.self, cellId: .selectedSingle) + register(SelectedFirstCell.self, cellId: .selectedFirst) + register(SelectedLastCell.self, cellId: .selectedLast) + register(RangeSingleCell.self, cellId: .rangeSingle) + register(RangeFirstCell.self, cellId: .rangeFirst) + register(RangeMiddleCell.self, cellId: .rangeMiddle) + register(RangeLastCell.self, cellId: .rangeLast) + } + + func cell(positionInRange: PositionInRange, positionInRow: PositionInRow, indexPath: IndexPath) -> Cell { + let cellId: CellId + switch (positionInRange, positionInRow) { + case (_, .outside): + cellId = .empty + case (.inactive, _): + cellId = .inactive + case (.middle, .first): + cellId = .rangeFirst + case (.middle, .last): + cellId = .rangeLast + case (.middle, .single): + cellId = .rangeSingle + case (.single, _), (.first, .last), (.last, .first), (.first, .single), (.last, .single): + cellId = .selectedSingle + case (.outside, _): + cellId = .regular + case (.middle, _): + cellId = .rangeMiddle + case (.first, _): + cellId = .selectedFirst + case (.last, _): + cellId = .selectedLast + } + + return dequeueCell(cellId: cellId, indexPath: indexPath) + } + + private func register(_ cellClass: AnyClass, cellId: CellId) { + collectionView?.register(cellClass, forCellWithReuseIdentifier: cellId.rawValue) + } + + private func dequeueCell(cellId: CellId, indexPath: IndexPath) -> Cell { + collectionView!.dequeueReusableCell(withReuseIdentifier: cellId.rawValue, for: indexPath) as! Cell + } +} diff --git a/iphone/DatePicker/DatePicker/Cells/EmptyCell.swift b/iphone/DatePicker/DatePicker/Cells/EmptyCell.swift new file mode 100644 index 0000000000..d51def95e6 --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/EmptyCell.swift @@ -0,0 +1,5 @@ +import UIKit + +final class EmptyCell: Cell { + +} diff --git a/iphone/DatePicker/DatePicker/Cells/InactiveCell.swift b/iphone/DatePicker/DatePicker/Cells/InactiveCell.swift new file mode 100644 index 0000000000..7f5d88796f --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/InactiveCell.swift @@ -0,0 +1,8 @@ +import UIKit + +final class InactiveCell: Cell { + override func updateTheme() { + label.textColor = theme.inactiveDayColor + label.font = theme.inactiveDayFont + } +} diff --git a/iphone/DatePicker/DatePicker/Cells/RangeFirstCell.swift b/iphone/DatePicker/DatePicker/Cells/RangeFirstCell.swift new file mode 100644 index 0000000000..02cede60e1 --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/RangeFirstCell.swift @@ -0,0 +1,20 @@ +import UIKit + +final class RangeFirstCell: Cell { + let rangeBgView = UIView() + + override func addSubviews() { + contentView.addSubview(rangeBgView) + rangeBgView.alignToSuperview(UIEdgeInsets(top: 4, left: 4, bottom: -4, right: 0)) + rangeBgView.layer.cornerRadius = 8 + rangeBgView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMinXMaxYCorner] + super.addSubviews() + } + + override func updateTheme() { + super.updateTheme() + label.textColor = theme.dayColor + label.font = theme.dayFont + rangeBgView.backgroundColor = theme.selectedRangeBackgroundColor + } +} diff --git a/iphone/DatePicker/DatePicker/Cells/RangeLastCell.swift b/iphone/DatePicker/DatePicker/Cells/RangeLastCell.swift new file mode 100644 index 0000000000..856298fab3 --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/RangeLastCell.swift @@ -0,0 +1,20 @@ +import UIKit + +final class RangeLastCell: Cell { + let rangeBgView = UIView() + + override func addSubviews() { + contentView.addSubview(rangeBgView) + rangeBgView.alignToSuperview(UIEdgeInsets(top: 4, left: 0, bottom: -4, right: -4)) + rangeBgView.layer.cornerRadius = 8 + rangeBgView.layer.maskedCorners = [.layerMaxXMinYCorner, .layerMaxXMaxYCorner] + super.addSubviews() + } + + override func updateTheme() { + super.updateTheme() + label.textColor = theme.dayColor + label.font = theme.dayFont + rangeBgView.backgroundColor = theme.selectedRangeBackgroundColor + } +} diff --git a/iphone/DatePicker/DatePicker/Cells/RangeMiddleCell.swift b/iphone/DatePicker/DatePicker/Cells/RangeMiddleCell.swift new file mode 100644 index 0000000000..a26ccfd048 --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/RangeMiddleCell.swift @@ -0,0 +1,18 @@ +import UIKit + +final class RangeMiddleCell: Cell { + let rangeBgView = UIView() + + override func addSubviews() { + contentView.addSubview(rangeBgView) + rangeBgView.alignToSuperview(UIEdgeInsets(top: 4, left: 0, bottom: -4, right: 0)) + super.addSubviews() + } + + override func updateTheme() { + super.updateTheme() + label.textColor = theme.dayColor + label.font = theme.dayFont + rangeBgView.backgroundColor = theme.selectedRangeBackgroundColor + } +} diff --git a/iphone/DatePicker/DatePicker/Cells/RangeSingleCell.swift b/iphone/DatePicker/DatePicker/Cells/RangeSingleCell.swift new file mode 100644 index 0000000000..8055bb9000 --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/RangeSingleCell.swift @@ -0,0 +1,19 @@ +import UIKit + +final class RangeSingleCell: Cell { + let rangeBgView = UIView() + + override func addSubviews() { + contentView.addSubview(rangeBgView) + rangeBgView.alignToSuperview(UIEdgeInsets(top: 4, left: 4, bottom: -4, right: -4)) + rangeBgView.layer.cornerRadius = 8 + super.addSubviews() + } + + override func updateTheme() { + super.updateTheme() + label.textColor = theme.dayColor + label.font = theme.dayFont + rangeBgView.backgroundColor = theme.selectedRangeBackgroundColor + } +} diff --git a/iphone/DatePicker/DatePicker/Cells/SelectedFirstCell.swift b/iphone/DatePicker/DatePicker/Cells/SelectedFirstCell.swift new file mode 100644 index 0000000000..9030748e0b --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/SelectedFirstCell.swift @@ -0,0 +1,22 @@ +import UIKit + +final class SelectedFirstCell: SelectedSingleCell { + let rangeTrailingView = UIView() + + override func addSubviews() { + contentView.addSubview(rangeTrailingView) + rangeTrailingView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + rangeTrailingView.leadingAnchor.constraint(equalTo: contentView.centerXAnchor), + rangeTrailingView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 4), + rangeTrailingView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -4), + rangeTrailingView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor) + ]) + super.addSubviews() + } + + override func updateTheme() { + super.updateTheme() + rangeTrailingView.backgroundColor = theme.selectedRangeBackgroundColor + } +} diff --git a/iphone/DatePicker/DatePicker/Cells/SelectedLastCell.swift b/iphone/DatePicker/DatePicker/Cells/SelectedLastCell.swift new file mode 100644 index 0000000000..e0d78aaf20 --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/SelectedLastCell.swift @@ -0,0 +1,22 @@ +import UIKit + +final class SelectedLastCell: SelectedSingleCell { + let rangeLeadingView = UIView() + + override func addSubviews() { + contentView.addSubview(rangeLeadingView) + rangeLeadingView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + rangeLeadingView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), + rangeLeadingView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 4), + rangeLeadingView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -4), + rangeLeadingView.trailingAnchor.constraint(equalTo: contentView.centerXAnchor) + ]) + super.addSubviews() + } + + override func updateTheme() { + super.updateTheme() + rangeLeadingView.backgroundColor = theme.selectedRangeBackgroundColor + } +} diff --git a/iphone/DatePicker/DatePicker/Cells/SelectedSingleCell.swift b/iphone/DatePicker/DatePicker/Cells/SelectedSingleCell.swift new file mode 100644 index 0000000000..332579455e --- /dev/null +++ b/iphone/DatePicker/DatePicker/Cells/SelectedSingleCell.swift @@ -0,0 +1,19 @@ +import UIKit + +class SelectedSingleCell: Cell { + let selectedBgView = UIView() + + override func addSubviews() { + contentView.addSubview(selectedBgView) + selectedBgView.alignToSuperview(UIEdgeInsets(top: 4, left: 4, bottom: -4, right: -4)) + selectedBgView.layer.cornerRadius = 8 + super.addSubviews() + } + + override func updateTheme() { + super.updateTheme() + selectedBgView.backgroundColor = theme.selectedDayBackgroundColor + label.textColor = theme.selectedDayColor + label.font = theme.selectedDayFont + } +} diff --git a/iphone/DatePicker/DatePicker/DatePickerView.swift b/iphone/DatePicker/DatePicker/DatePickerView.swift new file mode 100644 index 0000000000..aaa9b3d012 --- /dev/null +++ b/iphone/DatePicker/DatePicker/DatePickerView.swift @@ -0,0 +1,223 @@ +import UIKit + +public protocol DatePickerViewDelegate: AnyObject { + func datePickerView(_ view: DatePickerView, didSelect date: Date) +} + +public final class DatePickerView: UIView { + public weak var delegate: DatePickerViewDelegate? + public var theme = DatePickerViewTheme() { + didSet { + collectionView.reloadData() + } + } + + var calendar = Locale.current.calendar + let collectionView = UICollectionView(frame: .zero, collectionViewLayout: CalendarLayout()) + let cellStrategy: CellStrategy + var year: Int + var firstMonth = 1 + var numberOfMonths = 13 + + public var minimumDate: Date { + didSet { + year = calendar.component(.year, from: minimumDate) + firstMonth = calendar.component(.month, from: minimumDate) + numberOfMonths = calendar.dateComponents([.month], from: minimumDate, to: maximumDate).month! + 1 + collectionView.reloadData() + } + } + + public var maximumDate: Date { + didSet { + numberOfMonths = calendar.dateComponents([.month], from: minimumDate, to: maximumDate).month! + 1 + collectionView.reloadData() + } + } + + public var startDate: Date? { + didSet { + endDate = nil + } + } + + public var endDate: Date? { + didSet { + if let endDate = endDate { + guard let startDate = startDate, startDate < endDate else { fatalError("startDate must be less then endDate") } + } + collectionView.reloadData() + } + } + + override init(frame: CGRect) { + minimumDate = Date() + maximumDate = calendar.date(byAdding: .month, value: numberOfMonths - 1, to: minimumDate)! + year = calendar.component(.year, from: minimumDate) + firstMonth = calendar.component(.month, from: minimumDate) + cellStrategy = CellStrategy(collectionView) + super.init(frame: frame) + config() + } + + required init?(coder: NSCoder) { + minimumDate = Date() + maximumDate = calendar.date(byAdding: .month, value: numberOfMonths - 1, to: minimumDate)! + year = calendar.component(.year, from: minimumDate) + firstMonth = calendar.component(.month, from: minimumDate) + cellStrategy = CellStrategy(collectionView) + super.init(coder: coder) + config() + } + + private func config() { + collectionView.register(CalendarHeader.self, + forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, + withReuseIdentifier: "CalendarHeader") + collectionView.backgroundColor = .clear + addSubview(collectionView) + collectionView.alignToSuperview() + collectionView.dataSource = self + collectionView.delegate = self + collectionView.showsVerticalScrollIndicator = false + collectionView.showsHorizontalScrollIndicator = false + } + + private func dateAtIndexPath(_ indexPath: IndexPath) -> Date? { + var components = DateComponents() + components.year = year + components.month = indexPath.section + firstMonth + guard let month = calendar.date(from: components) else { return nil } + let firstWeek = calendar.component(.weekOfMonth, from: month) + components.weekday = indexPath.item % 7 + calendar.firstWeekday + components.weekOfMonth = indexPath.item / 7 + firstWeek + guard let date = calendar.date(from: components), + calendar.isDate(date, equalTo: month, toGranularity: .month) else { return nil } + return date + } + + private func positionInRow(_ indexPath: IndexPath) -> PositionInRow { + guard let date = dateAtIndexPath(indexPath) else { return .outside } + var first = false + var last = false + + let startOfMonthComponents = calendar.dateComponents([.year, .month], from: date) + guard let startOfMonth = calendar.date(from: startOfMonthComponents) else { return .outside } + + if indexPath.item % 7 == 0 || calendar.isDate(date, equalTo: startOfMonth, toGranularity: .day) { + first = true + } + + var components = DateComponents() + components.month = 1 + components.day = -1 + guard let endOfMonth = calendar.date(byAdding: components, to: startOfMonth) else { + return first ? .first : .middle + } + + if indexPath.item % 7 == 6 || calendar.isDate(date, equalTo: endOfMonth, toGranularity: .day){ + last = true + } + + switch (first, last) { + case (true, true): + return .single + case (true, _): + return .first + case (_, true): + return .last + default: + return .middle + } + } + + private func isActiveDate(_ date: Date) -> Bool { + return date >= minimumDate && date <= maximumDate + } + + private func positionInRange(_ indexPath: IndexPath) -> PositionInRange { + guard let date = dateAtIndexPath(indexPath) else { return .inactive } + if !isActiveDate(date) { return .inactive } + + var state: PositionInRange = .outside + guard let startDate = startDate else { return state } + + if calendar.isDate(date, equalTo: startDate, toGranularity: .day) { + state = .first + } + + guard let endDate = endDate else { + return state == .first ? .single : state + } + + if calendar.isDate(date, equalTo: endDate, toGranularity: .day) { + state = .last + } else if date > startDate && date < endDate { + state = .middle + } + + return state + } + +} + +extension DatePickerView: UICollectionViewDataSource { + public func numberOfSections(in collectionView: UICollectionView) -> Int { + numberOfMonths + } + + public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + var components = DateComponents() + components.year = year + components.month = section + firstMonth + let date = calendar.date(from: components)! + let range = calendar.range(of: .weekOfMonth, in: .month, for: date)! + return range.count * 7 + } + + public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = cellStrategy.cell(positionInRange: positionInRange(indexPath), + positionInRow: positionInRow(indexPath), + indexPath: indexPath) + cell.theme = theme + guard let date = dateAtIndexPath(indexPath) else { return cell } + let day = calendar.component(.day, from: date) + cell.label.text = "\(day)" + return cell + } + + public func collectionView(_ collectionView: UICollectionView, + viewForSupplementaryElementOfKind kind: String, + at indexPath: IndexPath) -> UICollectionReusableView { + switch kind { + case UICollectionView.elementKindSectionHeader: + let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, + withReuseIdentifier: "CalendarHeader", + for: indexPath) as! CalendarHeader + header.theme = theme + var components = DateComponents() + components.year = year + components.month = indexPath.section + firstMonth + let date = calendar.date(from: components) + let realComponents = calendar.dateComponents([.month, .year], from: date!) + header.config("\(calendar.standaloneMonthSymbols[realComponents.month! - 1].capitalized) \(realComponents.year!)", + weekdays: calendar.shortStandaloneWeekdaySymbols.map { $0.capitalized }, + firstWeekday: calendar.firstWeekday) + return header + default: + fatalError() + } + } +} + +extension DatePickerView: UICollectionViewDelegate { + public func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool { + guard let date = dateAtIndexPath(indexPath) else { return false } + return isActiveDate(date) + } + + public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + guard let date = dateAtIndexPath(indexPath) else { fatalError() } + delegate?.datePickerView(self, didSelect: date) + } +} diff --git a/iphone/DatePicker/DatePicker/DatePickerViewTheme.swift b/iphone/DatePicker/DatePicker/DatePickerViewTheme.swift new file mode 100644 index 0000000000..0755df9a6c --- /dev/null +++ b/iphone/DatePicker/DatePicker/DatePickerViewTheme.swift @@ -0,0 +1,26 @@ +import UIKit + +public struct DatePickerViewTheme { + public var monthHeaderBackgroundColor: UIColor = .white + + public var monthHeaderColor: UIColor = .darkText + public var monthHeaderFont: UIFont = UIFont.systemFont(ofSize: 16, weight: .semibold) + public var weekdaySymbolsColor: UIColor = .darkText + public var weekdaySymbolsFont: UIFont = UIFont.systemFont(ofSize: 14, weight: .regular) + + public var dayColor: UIColor = .darkText + public var dayFont: UIFont = UIFont.systemFont(ofSize: 16, weight: .regular) + + public var inactiveDayColor: UIColor = .lightGray + public var inactiveDayFont: UIFont = UIFont.systemFont(ofSize: 16, weight: .regular) + + public var selectedDayColor: UIColor = .white + public var selectedDayFont: UIFont = UIFont.systemFont(ofSize: 16, weight: .semibold) + public var selectedDayBackgroundColor: UIColor = .systemBlue + + public var selectedRangeColor: UIColor = .white + public var selectedRangeFont: UIFont = UIFont.systemFont(ofSize: 16, weight: .regular) + public var selectedRangeBackgroundColor: UIColor = UIColor.systemBlue.withAlphaComponent(0.3) + + public init() {} +} diff --git a/iphone/DatePicker/DatePicker/Info.plist b/iphone/DatePicker/DatePicker/Info.plist new file mode 100644 index 0000000000..9bcb244429 --- /dev/null +++ b/iphone/DatePicker/DatePicker/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/iphone/DatePicker/DatePicker/UIView+Align.swift b/iphone/DatePicker/DatePicker/UIView+Align.swift new file mode 100644 index 0000000000..ccd55b6994 --- /dev/null +++ b/iphone/DatePicker/DatePicker/UIView+Align.swift @@ -0,0 +1,13 @@ +import UIKit + +extension UIView { + func alignToSuperview(_ insets: UIEdgeInsets = .zero) { + translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + topAnchor.constraint(equalTo: superview!.topAnchor, constant: insets.top), + leftAnchor.constraint(equalTo: superview!.leftAnchor, constant: insets.left), + bottomAnchor.constraint(equalTo: superview!.bottomAnchor, constant: insets.bottom), + rightAnchor.constraint(equalTo: superview!.rightAnchor, constant: insets.right) + ]) + } +} diff --git a/xcode/omim.xcworkspace/contents.xcworkspacedata b/xcode/omim.xcworkspace/contents.xcworkspacedata index 1849d51d8d..09a033f509 100644 --- a/xcode/omim.xcworkspace/contents.xcworkspacedata +++ b/xcode/omim.xcworkspace/contents.xcworkspacedata @@ -199,6 +199,9 @@ + +