Swift
import UIKit
class ViewController: UIViewController {
var textView:UITextView?
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
determineMyDeviceOrientation()
}
func determineMyDeviceOrientation()
{
if UIDevice.current.orientation.isLandscape {
print("Device is in landscape mode")
} else {
print("Device is in portrait mode")
}
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
determineMyDeviceOrientation()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
JavaScript - Check Whether a String Starts and Ends With Certain Characters
Python - Check if a Number is Positive, Negative or 0
Linux - How to Install anc-api-tools
Linux - How to Install curvedns
Linux - How to Install zenmap
C++ - Check Whether a Number is Prime or Not
C - Count Number of Digits in an Integer
Kotlin - Round a Number to n Decimal Places
Java - Reverse a Number
C - Find Largest Number Using Dynamic Memory Allocation
C++ - Convert Binary Number to Decimal and vice-versa
Java - Create Pyramid and Pattern
Kotlin - Calculate the Power of a Number
JavaScript - Count the Number of Vowels in a String
Kotlin - Find Factorial of a Number
Linux - How to Install zlib1g-dev
Kotlin - Check Whether a Number is Even or Odd
Kotlin - Convert Byte Array to Hexadecimal
We have been online since 2021 and 1 millions of people around the globe have visited our website since then
More visitors every month