Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

swift ui check if number is a prime

func isPrime(_ number: Int) -> Bool {
    return number > 1 && !(2..<number).contains { number % $0 == 0 }
}
Comment

PREVIOUS NEXT
Code Example
Swift :: save date to userdefaults swift 
Swift :: swift append element to array 
Swift :: change from Date to String swift 5 
Swift :: show alert with textfield swift 
Swift :: xcode get info from text field 
Swift :: Unique device id ios swift 
Swift :: swift open web page 
Swift :: custom screen presentation controller coner radius swift 
Swift :: remove back button from navigation bar swift 
Swift :: cgrect swift 
Swift :: swift corner radious of view controller 
Swift :: swiftui pintch to zoom 
Swift :: swift javascript injection 
Swift :: how to play a video in swift 
Swift :: Swift Properties 
Swift :: swift for loop 
Swift :: Make a VStack fill the width of the screen in SwiftUI 
Swift :: link swiftui 
Swift :: swift reload tableviewcell at index 
Swift :: swift alert toast 
Swift :: uitextview placeholder uikit ios 
Swift :: set white place holder color in swift 
Swift :: swift infinite while loop 
Swift :: ForEach tabs swiftui 
Swift :: swift string 
Swift :: swiftui check available ios 
Swift :: swift reduce function 
Swift :: swift 5 touchupinsideview 
Swift :: Swift Weak Reference 
Swift :: swift md5 cryptokit 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =