2011-12-20 2 views
-3
const char *sqlSubCountries="SELECT subCountryID,subCountryName,subCountryComment,image,priority,hasRegions,navigationKey\ 
    FROM subCountries\ 
    ORDER BY priority ASC"; 
    sqlite3_stmt *statement; 
    int sqlResult = sqlite3_prepare_v2(database, sqlSubCountries, -1, &statement, NULL); 

이것은 단지 코드 예입니다. objective-c 코드로 sqlite (또는 다른 어떤) 데이터베이스에 저장된 뷰를 사용하려면 어떻게해야합니까?objective-c 코드보기 사용

+0

당신은'UIView' xib 및/또는 SQLite db 내에 'UIView' 객체를 생성하기위한 코드를 저장하고 싶습니까? 나는 그것이 할 수있다라고 확신한다. 그러나 ewwwwww. .. 왜? –

+1

@MichaelDautermann : 나는 OP가 * [SQL views] (http://www.sqlite.org/lang_createview.html) *를 의미한다고 생각합니다. – darvids0n

+1

@MichaelDautermann 원인 불명! 나는 보안을 위해 db에서 몇 가지 견해를 가지고 있고 ..... C#과 같은 objective-c 코드에서 사용하고 싶습니다. – NCFUSN

답변

0

갈 길이 멀지 만 개체를 ​​보관하고 SQLite 데이터베이스에 이진 데이터로 저장하는 방법을 배워야합니다. 좋은 Objective C sqlite3 계층에 대해서는 github에서 FMDB를 찾으십시오.

나는 코코아 NSCoding 프로토콜의 기능을 배우면서 "Archives and Serialization Programming Guide"를 읽었습니다.