का उपयोग करके रेखा रेखा बनाएं मैं तालिका दृश्य कक्ष में रेखा खींचना चाहता हूं ताकि मैं टेक्स्टफील्ड & एकल सेल में स्विच कर सकूं। मैंने सेल की ऊंचाई में वृद्धि की। मैं सेल में लाइन कैसे आकर्षित कर सकता हूं?CGContext
मैं जो कोड
//Get the CGContext from this view
CGContextRef context = UIGraphicsGetCurrentContext();
//Set the stroke (pen) color
CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
//Set the width of the pen mark
CGContextSetLineWidth(context, 1.0);
// Draw a line
//Start at this point
CGContextMoveToPoint(context, 10.0, 30.0);
//Give instructions to the CGContext
//(move "pen" around the screen)
CGContextAddLineToPoint(context, 310.0, 30.0);
//Draw it
CGContextStrokePath(context);
निम्नलिखित शामिल हैं तो मैं वर्गीकृत किया तालिका शैली के साथ एक tableViewController है UIView के उपवर्ग है। CellForRowAtIndexPath में मेरे पास निम्नलिखित कोड
//code to add textfield
DrawLineView *drawLine = [[DrawLineView alloc]init];
[cell addSubview:drawLine];
//code add switch
लेकिन यह किसी भी रेखा को चित्रित नहीं कर रहा है। मैं 2 अलग-अलग कोशिकाओं का उपयोग नहीं कर सकता। मुझे कृपया मेरी मदद करनी है। ग्राफिक्स i iphone से निपटने वाला यह मेरा पहला है। धन्यवाद
उत्तर के लिए धन्यवाद। लेकिन यह काम नहीं कर रहा है। – iOSAppDev