let numbers = [1, 2, 3, 4, 5] //앞에서 2개 가져오기 print(numbers.prefix(2)) // Prints "[1, 2]" //최대 개수 넘어도 상관없음 print(numbers.prefix(10)) // Prints "[1, 2, 3, 4, 5]" //뒤에서 2개 가져오기 print(numbers.suffix(2)) // Prints "[4, 5]" //최대 개수 넘어도 상관없음 print(numbers.suffix(10)) // Prints "[1, 2, 3, 4, 5]" iOS Swift Xcode
문자열만 복사 UIPasteboard.general.string = "복사할 문자열" 이미지만 복사 UIPasteboard.general.image = UIImage(systemName: "photo") 문자열과 이미지 같이 복사 import UniformTypeIdentifiers if let imageData = UIImage(systemName: "photo")?.pngData() { let pasteboard = [ [UTType.utf8PlainText.identifier : "복사할 문자열"], [UTType.png.identifier : imageData], ] UIPasteboard.general.setItems(pasteboard) } iOS Swift Xcode SwiftUI Objec..
Guideline 5.3.2 - Legal - Gaming, Gambling, and Lotteries Your app includes a contest or sweepstakes but it does not: - Indicate that Apple is not involved in any way with the contest or sweepstakes. Next Steps It is necessary to: - Include official rules of the contest or sweepstakes in the app and ensure the rules are available to users at all times. - Include an explicit statement in the cont..