好吧,只有当我们按某个字母时,目标c中的intellisense或代码感似乎才会触发.
如果我不知道对象方法的第一个字母,我更喜欢知道类支持的所有方法.
有办法吗?
 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
Run Code Online (Sandbox Code Playgroud)
我认为如果表是空的,即
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return [[BNUtilitiesQuick getBizs] count];
}
Run Code Online (Sandbox Code Playgroud)
总是返回 0
我希望-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath根本不应该调用
这个很重要。我正在制作一个程序来搜索事物,有时经过一些搜索,没有返回任何结果。
但是,无论如何都被调用了,我得到了一个例外。我该怎么办?
theTestController = [[[CustomCell alloc]initWithNibName:@"CustomCell" bundle:[NSBundle mainBundle]]autorelease];
Run Code Online (Sandbox Code Playgroud)
我的猜测是它将加载CustomCell并将theTestController设置为所有者.如果是这样:
为什么在cellForRowAtIndexPath我看到的大多数示例代码中[[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner: theTestController options:nil]; 代替?
[[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner: theTestController options:nil];和之间有什么区别theTestController = [[[CustomCell alloc]initWithNibName:@"CustomCell" bundle:[NSBundle mainBundle]]autorelease];
我试过替换[[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner: theTestController options:nil];   ,   theTestController = [[[CustomCell alloc]initWithNibName:@"CustomCell" bundle:[NSBundle mainBundle]]autorelease];我得到了错误.nil如果我使用后者,看起来仍然存在.
for(NSString * ID in someNSMutableDictionary) 
{
//do something
}
Run Code Online (Sandbox Code Playgroud)
现在,ID会按照添加到someNSMutableDictionary的顺序显示吗?

这意味着makeUrlforGetBusinessIDLocal是NSString*
我想知道它的价值.没有NSLog
我怎么知道这个价值?值为http:// isi ............
如果我右键单击并选择编辑值,我只能看到"0x754cf40"
我们知道"0x754cf40"是内存地址.我不想知道它,但是那个内存地址的价值.我怎样才能做到这一点?
没有NSLog我可以这样做吗?
#define mySynthesize(op) @synthesize op = _op;
Run Code Online (Sandbox Code Playgroud)
所以而不是打字
@synthesize someVar=_someVar;
@synthesize otherVar=_otherVar;
Run Code Online (Sandbox Code Playgroud)
我可以做
mySynthesize (someVar);
Run Code Online (Sandbox Code Playgroud)
嗯,它不起作用.我做错了什么?
当我做po [NSThread currentThread]时,我得到了
{name =(null),num = 4}
当我向左看时,我看到:

看起来它是线程号6,而不是4.还有什么属性我们需要调用来获取该线程数?
[NSThread currentThread] .number?虽然不存在.
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
    [[NSWorkspace sharedWorkspace] hideOtherApplications];// Insert code here to initialize your application
}
Run Code Online (Sandbox Code Playgroud)
这会隐藏其他应用程序.我们还应该怎样做才能隐藏自己的主窗口?
ARC代表自动参考计数.
我刚刚升级了我的项目以使用ARC.不是全部.一些.
我怎么知道?
xcode ×8
objective-c ×6
iphone ×2
uitableview ×2
cocoa ×1
codesense ×1
intellisense ×1
ios ×1
macros ×1
nslog ×1
nsstring ×1
nsthread ×1
php ×1