Files
Woka_Native_iOS/WOKA/Alerts/LogoutPopupVC.swift
BilalKhanWDI 850593c0c8 - Updated my list with guest user
- Handled sidebar logout if user is guest
- Handled free sign in my list
- Handled close button in my list for guest user to navigate to home
- Added check for guest user in web-series listing
- Added a universal popup for login for guest type user, also addd touch handling if user clicks outside of the box
2024-07-16 19:56:09 +05:30

36 lines
964 B
Swift

//
// LogoutPopupVC.swift
// WOKA
//
// Created by MacBook Pro on 16/07/24.
//
import UIKit
class LogoutPopupVC: UIViewController {
@IBOutlet weak var outerView: UIView!
@IBOutlet weak var guestLoginStack: UIStackView!
override func viewDidLoad() {
super.viewDidLoad()
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleTap(_:)))
outerView.addGestureRecognizer(tapGesture)
}
@objc func handleTap(_ gesture: UITapGestureRecognizer) {
let location = gesture.location(in: outerView)
if !guestLoginStack.frame.contains(location) {
self.dismiss(animated: true)
}
}
@IBAction func closeBtnTapped(_ sender: UIButton) {
self.dismiss(animated: true)
}
@IBAction func freeSignInTapped(_ sender: LocalisedElementsButton) {
UIApplication.setRootView(LoginNavVC.instantiate(from: .AuthenticationSB))
}
}