2011-08-16 32 views
0

我是iPhone應用開發的新手,兩週前我開始學習,因爲我最終的項目需要。 所以請原諒我,如果我的問題似乎很愚蠢。如何在camerabar中添加tabbar zbar sdk

我在forums和zbar文檔中搜索了關於如何自定義cameraView。 但我仍然沒有清楚的瞭解如何去做。

現在我試圖將tabbar添加到cameraView,有人可以告訴我該怎麼做嗎?

我知道我需要使用疊加層並創建自己的視圖,並將閱讀器添加爲子視圖。有沒有人可以更明確地告訴我如何修正它?

在此先感謝!

回答

0

從我所知道的,你需要添加tabbar到appDelegate,然後在每個標籤內的內部視圖。因此,您將有的appdelegate applicationDidFinishLoading方法

// Add the tab bar controller's view to the window and display. 
    [window addSubview:tabBarController.view]; 
    [window makeKeyAndVisible]; 
當然

內,你需要聲明它在appdelegate.h文件

@interface AppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> { 
    UIWindow *window; 
    UITabBarController *tabBarController; 
} 

@property (nonatomic, retain) IBOutlet UIWindow *window; 
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController; 

爲的TabBar教程搜索。它們必須在任何導航控制器之前創建。

然後將所有zbar代碼放入第一個視圖控制器中。

2

您必須創建自己的自定義UITabBarController類。並在您的自定義相機視圖中添加此控制器。並且自定義相機視圖由AVFoundation框架創建。