728x90
#1. 목표
- 파스에 프로젝트를 생성하고 클래스 생성 및 요소 값을 등록해보자.
#2 정리
1. Parse 사이트에서 IOS용 SDK를 다운받는다.
2. Swift 파일로 작업된 Parse 파일을 연다.
3. AppDelegate에서 ApplicationID와 Client Key 부분을 넣는다.
- Parse 사이트에서 프로젝트 생성시 발급받는 키임
4. VeiwController에 소스 삽입
- 클래스는 테이블과 동일
- 중괄호[]를 통해서 속성과 값을 넣어줌
- saveInBackgroundWithBlock를 통해서 보냄
var product = PFObject(className: "Products")
product["Name"] = "Pizza"
product["Discription"] = "Deliciously Cheesy"
product["Price"] = 9.99
product.saveInBackgroundWithBlock { (success, error ) -> Void in
if success == true {
print("successful")
}else{
print("Failed")
print(error)
}
}

"파트너스 활동을 통해 일정액의 수수료를 제공받을 수 있음"
'프로그래밍 > IOS' 카테고리의 다른 글
[IOS] 라이브러리에서 이미지 가져오기 :Getting from the photo library (0) | 2016.01.01 |
---|---|
[IOS] 파스 업데이트: Retrieving and Update data with parse (0) | 2016.01.01 |
[IOS] 웹페이지 보기: Viewing webpage (0) | 2015.12.26 |
[IOS] JSON 데이터 가져오기 (0) | 2015.12.26 |
[IOS] 이미지 다운로드 : Downloading image from web (0) | 2015.12.26 |