- 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
36 lines
964 B
Swift
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))
|
|
}
|
|
}
|