2013-03-01 164 views
-1

我正在開發應用程序以使用線條匹配單詞,我已經完成了問題和答案,但是我想知道如何使用線條來匹配特定問題以更正答案。我使用的數據庫,以顯示問題的答案提前在兩個對象之間繪製線條

enter image description here

感謝

回答

1

你可以從這個link

的源代碼,並改變線的像線寬變化的性質顏色等轉到該源代碼中的EC189DrawingViewController,並在以下部分編輯

- (void)drawShapes { 
//NSLog(@"In drawShapes!"); 

UIGraphicsBeginImageContext(_drawingPad.frame.size); 
CGContextRef context = UIGraphicsGetCurrentContext(); 

for(myShape *i in _collection) { 
    [self drawShapesSubroutine:i contextRef:context]; 
    if(i.selected == true) { 
     CGContextSetLineWidth(context, 1.0f); 
     CGContextSetStrokeColorWithColor(context, [[UIColor darkGrayColor] CGColor]); 
     float num[] = {6.0, 6.0}; 
     CGContextSetLineDash(context, 0.0, num, 2); 

     CGRect rectangle; 
     [self drawShapeSelector:i selectorRect: &rectangle]; 
     CGContextAddRect(context, rectangle);   
     CGContextStrokePath(context); 


     //tapped = true; 
    } 
} 

if(!skipDrawingCurrentShape && (selectedIndex == -1)) { 
    [self drawShapesSubroutine:_currentShape contextRef:context]; 
} 
_drawingPad.image = UIGraphicsGetImageFromCurrentImageContext(); 
UIGraphicsEndImageContext(); 
} 
+0

謝謝... .....我很高興:) – Rushabh 2013-03-01 06:40:10

+0

@Rocks哦..然後謝謝...快樂編碼;} – Dany 2013-03-01 06:45:18

相關問題