Training Module
The Training module provides all training-related UI screens and functionality.
Accessing the moduleβ
After connect, use sdk.modules.training (e.g. AzeooSDK.shared.modules.training).
Methodsβ
showMainScreenβ
Shows the main training screen with an overview of all training features.
func showMainScreen()
Example:
training?.showMainScreen()
showWorkoutPlansβ
Shows the workout plans screen where users can browse available workout plans.
func showWorkoutPlans()
Example:
training?.showWorkoutPlans()
showWorkoutPlanβ
Shows a specific workout plan.
func showWorkoutPlan(_ planId: String)
Parameters:
planId(String): The ID of the workout plan to display.
Example:
training?.showWorkoutPlan("plan-123")
showExercisesβ
Shows the exercises screen where users can browse the exercise library.
func showExercises()
Example:
training?.showExercises()
showExerciseβ
Shows a specific exercise.
func showExercise(_ exerciseId: String)
Parameters:
exerciseId(String): The ID of the exercise to display.
Example:
training?.showExercise("exercise-456")
showProgressβ
Shows the progress screen where users can track their fitness progress.
func showProgress()
Example:
training?.showProgress()
showScheduleβ
Shows the schedule screen where users can manage their workout schedule.
func showSchedule()
Example:
training?.showSchedule()
Complete Exampleβ
import UIKit
import AzeooSDK
class TrainingViewController: UIViewController {
@IBOutlet weak var mainScreenButton: UIButton!
@IBOutlet weak var workoutPlansButton: UIButton!
@IBOutlet weak var exercisesButton: UIButton!
@IBOutlet weak var progressButton: UIButton!
@IBOutlet weak var scheduleButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
setupButtons()
}
private func setupButtons() {
mainScreenButton.addTarget(self, action: #selector(showMainScreen), for: .touchUpInside)
workoutPlansButton.addTarget(self, action: #selector(showWorkoutPlans), for: .touchUpInside)
exercisesButton.addTarget(self, action: #selector(showExercises), for: .touchUpInside)
progressButton.addTarget(self, action: #selector(showProgress), for: .touchUpInside)
scheduleButton.addTarget(self, action: #selector(showSchedule), for: .touchUpInside)
}
@objc private func showMainScreen() {
AzeooUI.instance?.training.showMainScreen()
}
@objc private func showWorkoutPlans() {
AzeooUI.instance?.training.showWorkoutPlans()
}
@objc private func showExercises() {
AzeooUI.instance?.training.showExercises()
}
@objc private func showProgress() {
AzeooUI.instance?.training.showProgress()
}
@objc private func showSchedule() {
AzeooUI.instance?.training.showSchedule()
}
}
Next Stepsβ
- Nutrition Module - Nutrition-related screens
- Configuration - Customize the UI
- Client API - Low-level API reference