Skip to content

Commit

Permalink
Merge pull request #17 from SimformSolutionsPvtLtd/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
mobile-simformsolutions authored Jan 9, 2025
2 parents f39cd7f + 5bb2eee commit 286fbbf
Show file tree
Hide file tree
Showing 23 changed files with 99 additions and 98 deletions.
2 changes: 1 addition & 1 deletion Example/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

*/

"ok" = "Ok";
"Ok" = "Ok";
"cancel" = "Cancel";
1 change: 1 addition & 0 deletions SSDateTimePicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Pod::Spec.new do |spec|
spec.platform = :ios, "15.0"
spec.source = { :git => "https://github.com/SimformSolutionsPvtLtd/SSDateTimePicker.git", :tag => spec.version.to_s }
spec.source_files = "Sources", "Sources/SSDateTimePicker/SSDateTimePicker/**/*.{swift, xcassets}"
spec.resources = "Sources/SSDateTimePicker/**/*.{xcassets,storyboard,xib,plist,json,strings,lproj}"
spec.swift_versions = "5.9"

end
136 changes: 68 additions & 68 deletions Sources/SSDateTimePicker/SSDateTimePicker.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation
import SwiftUI

struct CornerRadiusStyle: ViewModifier {
struct SSCornerRadiusStyle: ViewModifier {

// MARK: - Properties

Expand All @@ -19,12 +19,12 @@ struct CornerRadiusStyle: ViewModifier {

func body(content: Content) -> some View {
content
.clipShape(CornerRadiusShape(radius: radius, corners: corners))
.clipShape(SSCornerRadiusShape(radius: radius, corners: corners))
}

}

struct CornerRadiusShape: Shape {
struct SSCornerRadiusShape: Shape {

//MARK: - Property

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

struct ImageConstant {
struct SSImageConstant {

static let chevronRight = "chevron.right"
static let chevronLeft = "chevron.left"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

class LocalizedString {
class SSLocalizedString {

static let ok = "Ok".localized()
static let cancel = "Cancel".localized()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Utils.swift
// SSUtils.swift
// SSDateTimePicker
//
// Created by Rizwana Desai on 18/12/23.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extension View {
///
/// - Returns: A modified version of the view with the specified corner radius applied.
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View {
ModifiedContent(content: self, modifier: CornerRadiusStyle(radius: radius, corners: corners))
ModifiedContent(content: self, modifier: SSCornerRadiusStyle(radius: radius, corners: corners))
}

/// Applies a theme-specific button style to the view using a custom modifier.
Expand All @@ -54,7 +54,7 @@ extension View {
///
/// - Returns: A modified version of the view with the specified text color and font for a themed button.
func themeButton(_ txtColor: Color, _ font: Font) -> some View {
self.modifier(ThemeButtonModifier(textColor: txtColor, font: font))
self.modifier(SSThemeButtonModifier(textColor: txtColor, font: font))
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public struct SSDatePicker: View, DatePickerConfigurationDirectAccess {
case .date:
dateSectionView
case .month:
MonthSelectionView()
SSMonthSelectionView()
case .year:
YearSelectionView(currentView: $currentView)
SSYearSelectionView(currentView: $currentView)
}
}
}
Expand Down Expand Up @@ -101,7 +101,7 @@ public struct SSDatePicker: View, DatePickerConfigurationDirectAccess {

private var lblSelectedDate: some View {
VStack(alignment: .leading, spacing: SSPickerConstants.verticleSpacingTen) {
Text(LocalizedString.selectDate)
Text(SSLocalizedString.selectDate)
.font(headerTitleFont)
.foregroundColor(headerTitleColor)
Text(datePickerManager.selectedDate?.formatedString(headerDateFormat) ?? datePickerManager.currentMonth.monthYear)
Expand All @@ -125,7 +125,7 @@ public struct SSDatePicker: View, DatePickerConfigurationDirectAccess {
private var datesView: some View {
VStack(spacing: SSPickerConstants.verticleSpacingDates) {
ForEach(weeks, id: \.self) { week in
WeekDatesView(week: week)
SSWeekDatesView(week: week)
}
}
}
Expand Down Expand Up @@ -172,15 +172,15 @@ public struct SSDatePicker: View, DatePickerConfigurationDirectAccess {
Button {
self.datePickerManager.actionPrev(for: currentView)
} label: {
self.imageNextPrev(ImageConstant.chevronLeft)
self.imageNextPrev(SSImageConstant.chevronLeft)
}
}

private var btnNext: some View {
Button {
self.datePickerManager.actionNext(for: currentView)
} label: {
self.imageNextPrev(ImageConstant.chevronRight)
self.imageNextPrev(SSImageConstant.chevronRight)
}
}

Expand All @@ -204,7 +204,7 @@ public struct SSDatePicker: View, DatePickerConfigurationDirectAccess {
self.actionCancel()
}
} label: {
Text(LocalizedString.cancel)
Text(SSLocalizedString.cancel)
.themeButton(buttonsForegroundColor, buttonsFont)
}
}
Expand All @@ -215,7 +215,7 @@ public struct SSDatePicker: View, DatePickerConfigurationDirectAccess {
self.actionOk()
}
} label: {
Text(LocalizedString.ok)
Text(SSLocalizedString.ok)
.themeButton(buttonsForegroundColor, buttonsFont)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import SwiftUI

struct DateView: View, DatePickerConfigurationDirectAccess {
struct SSDateView: View, DatePickerConfigurationDirectAccess {

// MARK: - Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import SwiftUI

struct MonthSelectionView: View, DatePickerConfigurationDirectAccess {
struct SSMonthSelectionView: View, DatePickerConfigurationDirectAccess {

// MARK: - Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import SwiftUI

struct WeekDatesView: View, DatePickerConfigurationDirectAccess {
struct SSWeekDatesView: View, DatePickerConfigurationDirectAccess {

// MARK: - Properties

Expand Down Expand Up @@ -43,7 +43,7 @@ struct WeekDatesView: View, DatePickerConfigurationDirectAccess {
private var datesForWeek: some View {
HStack(spacing: SSPickerConstants.horizontalSpacingDates) {
ForEach(dates, id: \.self) { date in
DateView(date: date, weekDateInSelectedMonth: week)
SSDateView(date: date, weekDateInSelectedMonth: week)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import SwiftUI

public struct YearSelectionView: View, DatePickerConfigurationDirectAccess {
public struct SSYearSelectionView: View, DatePickerConfigurationDirectAccess {

// MARK: - Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import SwiftUI

struct ThemeButtonModifier: ViewModifier {
struct SSThemeButtonModifier: ViewModifier {

var textColor: Color
var font: Font
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public struct SSTimePicker: View, TimePickerConfigurationDirectAccess {

private var lblSelectedDate: some View {
VStack(alignment: .leading, spacing: SSPickerConstants.verticleSpacingTen) {
Text(LocalizedString.selectTime)
Text(SSLocalizedString.selectTime)
.font(headerTitleFont)
.foregroundColor(headerTitleColor)
textFieldHourMinutes
Expand Down Expand Up @@ -103,7 +103,7 @@ public struct SSTimePicker: View, TimePickerConfigurationDirectAccess {
ToolbarItem(placement: .keyboard) {
HStack {
Spacer()
Button(LocalizedString.done) {
Button(SSLocalizedString.done) {
actionDone()
}
}
Expand All @@ -124,7 +124,7 @@ public struct SSTimePicker: View, TimePickerConfigurationDirectAccess {
timePickerManager.selectedTimeFromat = .am
}
} label: {
labelTimeFormat(LocalizedString.am, isSelected: timePickerManager.selectedTimeFromat == .am)
labelTimeFormat(SSLocalizedString.am, isSelected: timePickerManager.selectedTimeFromat == .am)
}
}

Expand All @@ -134,7 +134,7 @@ public struct SSTimePicker: View, TimePickerConfigurationDirectAccess {
timePickerManager.selectedTimeFromat = .pm
}
} label: {
labelTimeFormat(LocalizedString.pm, isSelected: timePickerManager.selectedTimeFromat == .pm)
labelTimeFormat(SSLocalizedString.pm, isSelected: timePickerManager.selectedTimeFromat == .pm)
}
}

Expand All @@ -152,7 +152,7 @@ public struct SSTimePicker: View, TimePickerConfigurationDirectAccess {
self.actionCancel()
}
} label: {
Text(LocalizedString.cancel)
Text(SSLocalizedString.cancel)
.themeButton(buttonsForegroundColor, buttonFont)
}
}
Expand All @@ -163,7 +163,7 @@ public struct SSTimePicker: View, TimePickerConfigurationDirectAccess {
self.actionOk()
}
} label: {
Text(LocalizedString.ok)
Text(SSLocalizedString.ok)
.themeButton(buttonsForegroundColor, buttonFont)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct SSTimeTextField: View, TimePickerConfigurationDirectAccess {
}

private var txtField: some View {
TextField(isHourField ? LocalizedString.hour : LocalizedString.minute, text: $time)
TextField(isHourField ? SSLocalizedString.hour : SSLocalizedString.minute, text: $time)
.focused($isFocused)
.keyboardType(.numberPad)
.multilineTextAlignment(.center)
Expand Down

0 comments on commit 286fbbf

Please sign in to comment.