How to detect touch in triangle area
        Posted  
        
            by Romain
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Romain
        
        
        
        Published on 2010-06-08T21:35:12Z
        Indexed on 
            2010/06/08
            21:52 UTC
        
        
        Read the original article
        Hit count: 362
        
iphone
|cocoa-touch
For my application, i need to divide diagonally the screen of my iphone in 4 parts and detect which of the part was touched. I am very confused because my areas are triangles and not squares and I can't find a solution to detect which of the triangle was touched...
I get the touched Point with method touchesBegan, and there I'm stuck... :( How to define triangle shapes and test if it was touched? with View? layer?
It could be really cool if someone could help me.
© Stack Overflow or respective owner