我看到了目标-C的不同公约(。
我看到的两点是:
- (void)dealloc {
[super dealloc];
}
页: 1
- (void) dealloc
{
[super dealloc];
}
这使我感到困惑,因为我预计,对如此小的社区而言,只有一项公约。
两者中哪一个更为常见?
我看到了目标-C的不同公约(。
我看到的两点是:
- (void)dealloc {
[super dealloc];
}
页: 1
- (void) dealloc
{
[super dealloc];
}
这使我感到困惑,因为我预计,对如此小的社区而言,只有一项公约。
两者中哪一个更为常见?
我不认为对此有任何坦诚的回答(无论是以客观语言还是以任何其他语言发言)。 个人更喜欢:
- (void)dealloc {
[super dealloc];
}
......当然还有许多人喜欢替代风格。 更常见的情况是:,似乎属于首选风格(同一行的宽度),因此,与较为常见的格局一样安全。 不过,我确实记得,在建议采用第二种风格的旧的 Apple果编码公约文件(在下行)上,我仍然有 st(但建议使用两个空间,而不是4个ents子,因此我认为该文件的垃圾处理)。 你可能也只是选择你们的偏好。
我建议的唯一一点是,你绝不应将这两种风格混在一起。 缩略语 如果你重新编辑使用一项公约的第三方来源文件,则遵循同样的公约,而不是使用替代格式。 然后,至少您的编码风格将始终符合每个汇编。
这是一个纯风格的问题,只有一个公约: 选择你喜欢的东西。
I have a UIToolbar that needs three buttons in a radio style, meaning that of the three, only one button can be pushed at a time. The documentation makes reference to the possibility of setting up ...
I have a UITextField that is a subview of a UITableViewCell. When my view loads, I want the text field to become first responder. I have a pointer to the text field in the table cell, so to do this I ...
I want to allow the user to enter a valid date using the iPhone’s settings application. I have experimented with many of the PreferenceSpecifiers data node types including date. I have two issues: ...
I m going to use an example to properly illustrate my confusion. I can t quite wrap my head around this. In Cocoa touch, we have UIViewController and its subclass, UINavigationController. Now, UIVC ...
Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...
I have an app which has to load some data at startup, so I want to display a splash-screen animation. I m using the MPMoviePlayerController to play a m4v file. The movie has it s background set to [...
Is there a way to add a location from an MKMapView in my application to the built-in Google Maps app? From what I understand there is probably one of two ways to do it: using [[UIApplication ...
I m trying to chain animation events. The application I m coding for work has a multiple choice quiz. First you pick your multiple choice answer. The quiz view fades away. Then a label ("correct" or "...