को कवर करने के लिए मुझे अपनी तालिका पंक्तियों में से एक बटन होना चाहिए जो मेरे UITableView की पूरी पंक्ति लेता है। मुझे लगता है कि इसके बारे में जाने का सबसे अच्छा तरीका UIButton को तुरंत चालू करना है, और इसे UITableViewCell के उदाहरण के रूप में एक ही फ्रेम आकार दें, और इसे सेल में एक सबव्यूव के रूप में जोड़ें। मैं लगभग वहां हूं, लेकिन कुछ पिक्सल बंद करने के लिए यह सही स्पर्श नहीं है। क्या इसके लिए कोई बेहतर दृष्टिकोण है, या शायद सही प्लेसमेंट सटीकता प्राप्त करने के लिए मेरे प्लेसमेंट सटीकता को ठीक किया जा सकता है?UIButton को UITableViewCell
cell = [tv dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == nil) {
cell = [self tableviewCellWithReuseIdentifier:CellIdentifier];
}
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setFrame:CGRectMake(0.0f, 5.0f, 320.0f, 44.0f)];
[button setTitle:@"Do Stuff" forState:UIControlStateNormal];
[button addTarget:self action:@selector(doStuff:) forControlEvents:UIControlEventTouchUpInside];
[cell addSubview:button];
क्या आप भविष्य में अपने प्रश्नों से अप्रचलित टैग "objectivec" छोड़ सकते हैं? इसके अलावा, "कोको" आईफोन सवालों के लिए वास्तव में उपयुक्त नहीं है। धन्यवाद! –