IBActionメソッドに接続されているカスタムセルにボタンがあります - downloading
です。ボタンをクリックすると、クリックされたセルのインデックスパスが取得され、配列の値がそのインデックスパスから突き刺さるようになります。私のコードです。他のコントローラから戻った後に文字列の値が取得されない
-(IBAction)downloading:(id)sender
{
if(abletodownload){
classvalue = 1;
UITableViewCell *clicked = (UITableViewCell *)[[sender superview] superview];
clickedPath = [self.tableview indexPathForCell:clicked];
idstring =[arr7 objectAtIndex: clickedPath.row];
NSLog(@"idstring.....%@",idstring);
urlstring = [arr6 objectAtIndex: clickedPath.row];
holdingurlstring =[[NSString alloc]initWithString:urlstring];
NSLog(@"urlstring...%@",holdingurlstring);
titlestring = [arr2 objectAtIndex: clickedPath.row];
holdingtitlestring = [[NSString alloc]initWithString:titlestring];
NSLog(@"titlestring.....%@",titlestring);
objInAppClass = [[InAppClass alloc]init];
[objInAppClass canmakepayment];}
私はInAppClassを割り当てて起動し、InAppPurchaseのすべての機能を実行しました。 私がInAppClassから戻ったとき、私はholdurlstring
の値を得ることができず、他の部分にはholdtitlestring
の値がここにあります。
要するに、InAppClassから戻った後、urlstringとtitlstringの値を保存する必要があります。何をすべきか?
:カスタムセルクラスを使用していません。私は別の空のペン先を作成しました。そこでは、ライブラリの中に識別子とボタンを持つUITableViewCellを配置しました。次に、cellForRowAtIndexPathメソッドでそのペン先を呼び出しました。 – Ketan
二番目に、私はちょうどそれらの部分にあるので、他の部分に 'holdurlstring'と 'holdtitlestring'の値が必要です。 Inの場合は、Inappclassに制御を移す前に値を表示します。しかし後でそれはない。 – Ketan