앱이 사자를 지원하기 위해가는 경우, loadNibNamed:owner:topLevelObjects:
는 발생하지 않습니다 사자에 실행할 때 예외 (알 수없는 선택)을 얻을 수 있습니다.
// loadNibNamed:owner:topLevelObjects was introduced in 10.8 (Mountain Lion).
// In order to support Lion and Mountain Lion +, we need to see which OS we're
// on. We do this by testing to see if [NSBundle mainBundle] responds to
// loadNibNamed:owner:topLevelObjects: ... If so, the app is running on at least
// Mountain Lion... If not, then the app is running on Lion so we fall back to the
// the older loadNibNamed:owner: method. If your app does not support Lion, then
// you can go with strictly the newer one and not deal with the if/else conditional.
if ([[NSBundle mainBundle] respondsToSelector:@selector(loadNibNamed:owner:topLevelObjects:)]) {
// We're running on Mountain Lion or higher
[[NSBundle mainBundle] loadNibNamed:@"NibName"
owner:self
topLevelObjects:nil];
} else {
// We're running on Lion
[NSBundle loadNibNamed:@"NibName"
owner:self];
}
당신이 정말로 산 사자 +에 대한 topLevelObjects:&array
를 사용하려면, 당신은 또한 사자를 지원하려면, 당신이 loadNibFile에 후퇴해야합니다 다음과 같습니다 : 일부는 주위를 검색 한 후 나는이 함께했다 externalNameTable을 : withZone : 라이온스 조건을위한 클래스와 인스턴스 메소드로 사용 가능합니다. 이걸 대체하기 위해 loadNibNamed:owner:topLevelObjects:
이라는 느낌이 들었습니다.
또 다른 loadNibNamed:owner:topLevelObjects:
을 시트에 사용할 때 시트 (창)에 대해 "릴리스 할 때 릴리스"를 선택 취소해야한다고 읽었습니다.
[self.sheet close];
self.sheet = nil;
나는 확실하지 않다가 아닌 모달 창을 열고 있다면 그 체크 박스에 대해 수행해야 정확히 무엇을 : 당신이 시트를 닫습니다 때의주의를 기울여야한다. 어떤 아이디어?
사용자 정의 시트 부분을 별도의 질문으로 분리하는 것을 고려하십시오. 사용자 정의 시트를 구현하는 가장 좋은 방법은 무엇입니까? 좋은 제목이 될 것입니다. – alfwatt