In the registration of the network used by the three-party library is afnetworking, registered with only one account password, but the individual users still have a lot of information is not filled, then I use the account login back before the interface needs to pass the value, the user picture and name, then the program crashes, the error message displayed is
-[nsnull length]: Unrecognized selector sent to instance 0X30ADB48
The reason is that the value returned in the background is a lot of NULL, in OC is the null value of Nsnull, so when assigned, the program crashes.
Workaround:
When assigning a value, add a judgment when the fetch data is not empty and then assign a value, and the null is not assigned.
Determine whether get is empty
if (![ Usernicename Iskindofclass:[nsnull class]) {
Assignment statements
[Self.loglabbtnper settitle:usernicename forstate:uicontrolstatenormal];
}
IOS Notes-Partial problem resolution encountered when applying login