Three20에서보기 컨트롤러 탐색과 관련하여 질문이 있습니다. 나는 TTTableView "Gallery"와 TTPhotoViewController "Photos"를 가지고있다. 하나의 표보기 항목을 터치하면 앱이 사진보기로 이동합니다.TTTableview에서 TTPhotoView로 Three20 탐색
TTNavigator *navigator = [TTNavigator navigator];
navigator.supportsShakeToReload = NO;
navigator.persistenceMode = TTNavigatorPersistenceModeAll;
TTURLMap *map = navigator.URLMap;
[map from:@"*" toViewController:[TTWebController class]];
[map from:@"tt://launcher" toSharedViewController:[LauncherViewController class]];
[map from:@"tt://photos" parent:@"tt://gallery" toViewController:[PhotoViewController class] selector:nil transition:0];
[map from:@"tt://gallery" parent:@"tt://launcher" toViewController:[GalleryViewController class] selector:nil transition:0];
GalleryViewController가있는 tableview 컨트롤러가 GalleryViewController.m
-(void)createModel
{
self.dataSource = [TTListDataSource dataSourceWithObjects:
[TTTableSubtitleItem itemWithText:@"Album One" subtitle:nil imageURL:@"http://example.image.url" URL:@"tt://photos"]
,
[TTTableSubtitleItem itemWithText:@"Album Two" subtitle:nil imageURL:@"http://example.image.url2" URL:@"tt://photos"],
nil];
}
에서
@interface GalleryViewController : TTTableViewController
@end
되면, AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
방법에
: 여기
는 I 사용 코드이다TTCatalog.xcodeproj
샘플 프로젝트에서이 코드를 복사했습니다. 하지만 사진보기를 드릴 할 수 없어서 테이블보기 항목에서 사진보기로 이동하려고 할 때 콘솔에서 다음을 얻었습니다.
nested push animation can result in corrupted navigation bar
Finishing up a navigation transition in an Navigation Bar subview tree might get corrupted.
Unbalanced calls to begin/end appearance transitions for <PhotoViewController: 0x6c5d8f0>.
그래서이 질문을 해결하는 방법을 모르겠습니다. 감사!
-------- 업데이트 : ----------
나는 문제를 해결하는 방법을 알아 냈어. toSharedViewController
이 문제를 해결할 수있는 이유 AppDelegate
방법에서, 대신 [map from: parent: toViewController: selector: transition:]
의
[map from:@"tt://launcher" toSharedViewController:[LauncherViewController class]];
[map from:@"tt://photos" parent:@"tt://gallery" toSharedViewController:[PhotoViewController class] selector:nil];
[map from:@"tt://gallery" parent:@"tt://launcher" toSharedViewController:[GalleryViewController class] selector:nil];
를 사용하지만, 여기에 또 다른 질문을 제공, 누군가가 설명 할 수 있습니까?