When I debug the code on the iPhone to call a function, the result of one-step debugging cannot enter the function.

Source: Internet
Author: User

 

 

Problem: I debugCodeWhen a function is called, the result of one-step debugging cannot enter the function.
The following code is used:

-(Void) passvalue :( nsarray *) secondnodesarray
{


Treeviewcell * cell = (treeviewcell *) [self. tableview cellforrowatindexpath: indexpathcopy];
[Cell onexpandcell];

}


-(Void) onexpandcell
{
[Self expand];
}


-(Void) Expand
{
Nslog (@ "Expand ");
If ([treenode haschildren]) {// If a subnode exists
Treenode. Expanded =! Treenode. Expanded; // switch the "Expand/collapse" status
If (treenode. Expanded) {// If the expanded status is set, set the "+/-" icon.
[Btnexpand setimage: [uiimage imagenamed:
@ "Minustree.png"] forstate: uicontrolstatenormal];
} Else {
[Btnexpand setimage: [uiimage imagenamed:
@ "Plustree.png"] forstate: uicontrolstatenormal];
}
If (owner! = Nil & onexpand! = Nil) // If the onexpand attribute is set, call
[Owner login mselector: onexpand withobject: treenode];
}
}

The red code is the breakpoint I set, and the result cannot be run into the expand function.

 

Summary (ProgramThe reason is that the object is not created and cannot be executed in the function.

That is to say

Treeviewcell * cell = (treeviewcell *) [self. tableview cellforrowatindexpath: indexpathcopy]; not created successfully.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.