2013-01-17 69 views
0

我沒有看到我的ViewController貝寶按鈕。看不到貝寶按鈕在視圖

UIButton *button = [[PayPal getPayPalInst]getPayButtonWithTarget:self andAction:@selector(payWithPayPal) andButtonType:BUTTON_278x43]; 

以上是我的代碼。我沒有得到任何ButtonType。這是我看這個在日誌...

Printing description of button: 
<nil> 

,而不是這個......

Printing description of button: 
<UIButton: 0x72c6020; frame = (0 0; 278 43); opaque = NO; layer = <CALayer: 0x72bc910>> 

我的iPhone是新的話,任何的想法將是對我來說是很大的幫助。 謝謝。

回答

0

你已經錯過了你上一堂課的這段代碼,你將來到你現在的班級。首先,您需要初始化的PayPal: -

[[PayPal getPayPalInst] fetchDeviceReferenceTokenWithAppID:@"APP-80W284485P519543T" forEnvironment:ENV_SANDBOX withDelegate:self]; 
[[PayPal getPayPalInst] setLang:@"it_IT"]; 

希望這有助於你..

+0

它顯示 - 實例方法「fetchDeviceReferenceTokenWithAppId」沒有找到......我用貝寶代表。 – Sam

+0

你有申明#import「PayPal.h」嗎? –

+0

是的,我確實... paypal.h和ExpressCheckoutResponseHandler.h – Sam