简体   繁体   中英

IOS8 Objective-C SignaturePoint CGRectValue

Below is the output for "signature.rawPoints" with 32bit architecture Objective-C code

(
        "NSRect: {{130, 142.5}, {2.3333333, 100}}",
        "NSRect: {{136, 139.5}, {2.4990008, 101}}",
        "NSRect: {{152.25, 131}, {2.0691545, 102}}",
        "NSRect: {{169.75, 121}, {1.7328094, 103}}",
        "NSRect: {{185.25, 111}, {1.5653242, 104}}",
        "NSRect: {{196.125, 104}, {1.6099705, 105}}",
        "NSRect: {{200.75, 101.375}, {1.9532523, 106}}"
    ),

But with 64bit architecture along with IOS8 below is the output

(
        "\nlocation: 87.000000,112.000000\nvelocity: 0.000000,0.000000\nacceleration: 0.000000,0.000000\ntimestamp: 19476.794956\npressure: 1.000000\ndiameter: 4.666667\nid: 100",
        "\nlocation: 88.000000,116.000000\nvelocity: 22.341108,89.364433\nacceleration: 499.125115,1996.500461\ntimestamp: 19476.839717\npressure: 1.000000\ndiameter: 5.006714\nid: 101",
        "\nlocation: 92.000000,125.000000\nvelocity: 228.450167,514.012876\nacceleration: 11771.412252,24252.751985\ntimestamp: 19476.857226\npressure: 1.000000\ndiameter: 4.700317\nid: 102",
        "\nlocation: 97.000000,134.000000\nvelocity: 298.178096,536.720573\nacceleration: 4158.268213,1354.187550\ntimestamp: 19476.873995\npressure: 1.000000\ndiameter: 4.437694\nid: 103")

The below code is not working with 64-bit architecture on the above rawpoints to find CGRectValues.

CGRect r1 = [[[signature.rawPoints objectAtIndex:i]objectAtIndex:j] CGRectValue]; 

Error:

2015-06-04 19:18:45.933 MySampleCloset UAT[40174:865394] -[T1SignaturePoint CGRectValue]: unrecognized selector sent to instance 0x7f90d86b75a0 2015-06-04 19:18:45.977 MySampleCloset UAT[40174:865394] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[T1SignaturePoint CGRectValue]: unrecognized selector sent to instance 0x7f90d86b75a0'

Please suggest a solution.

Check your code carefully. Unrecognized selector means, that you try to use method to "wrong" object, like treating NSString as an NSArray for example, and sending NSString objectAtIndex message.

Or maybe, you using some kind of 3rd libraries, and they are not updated for 64 bit architecture.

If you want better answer then that, edit your code with CMD+K and show us your code..

TSignaturePoint.h added into the latest third point TSignature library, so we have to use the below code to find the x and y co ordinates for the signature of every letter.

CGPoint p = [[[signature.rawPoints objectAtIndex:i]objectAtIndex:j] location];

Note: [[signature.rawPoints objectAtIndex:i]objectAtIndex:j] is the type of TSignature.

we can also write the above as below TSignature * sig = [[signature.rawPoints objectAtIndex:i]objectAtIndex:j]; CGPoint p = sig.location;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM