Skip to content

Commit

Permalink
jesus crist please work
Browse files Browse the repository at this point in the history
  • Loading branch information
cranci1 committed May 24, 2024
1 parent 5c29e00 commit 52714e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Binary file not shown.
16 changes: 7 additions & 9 deletions AnimeGen/Settings/SettingsMain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,25 @@ class SettingsMain: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()

// Initialize steppers with singleton values
StepperWidth.value = Settings.shared.imageWidth
StepperHeight.value = Settings.shared.imageHeight

// Set minimum and maximum values if needed
StepperWidth.minimumValue = 50.0
StepperWidth.maximumValue = 300.0
StepperHeight.minimumValue = 50.0
StepperHeight.maximumValue = 300.0
StepperWidth.minimumValue = 1.0
StepperWidth.maximumValue = 100.0

StepperHeight.minimumValue = 1.0
StepperHeight.maximumValue = 100.0

// Add target actions for steppers
StepperWidth.addTarget(self, action: #selector(widthStepperChanged(_:)), for: .valueChanged)
StepperHeight.addTarget(self, action: #selector(heightStepperChanged(_:)), for: .valueChanged)
}

@objc func widthStepperChanged(_ sender: UIStepper) {
@IBAction func widthStepperChanged(_ sender: UIStepper) {
Settings.shared.imageWidth = sender.value
print("New imageWidth: \(Settings.shared.imageWidth)")
}

@objc func heightStepperChanged(_ sender: UIStepper) {
@IBAction func heightStepperChanged(_ sender: UIStepper) {
Settings.shared.imageHeight = sender.value
print("New imageHeight: \(Settings.shared.imageHeight)")
}
Expand Down

0 comments on commit 52714e3

Please sign in to comment.