summaryrefslogtreecommitdiffhomepage
path: root/objective-c.html.markdown
diff options
context:
space:
mode:
authorAdam <adam@adambard.com>2013-08-13 10:30:44 -0700
committerAdam <adam@adambard.com>2013-08-13 10:30:44 -0700
commit50e49eced17ee758d47ca06141ee2b0e27ea2ee8 (patch)
tree9deb5174ff98d5c8c86160e9d6a0344e1f9cf458 /objective-c.html.markdown
parent3b640acf0d72b93bf0f9a7f61a926765a857bc38 (diff)
Line length edits to objective c
Diffstat (limited to 'objective-c.html.markdown')
-rw-r--r--objective-c.html.markdown14
1 files changed, 8 insertions, 6 deletions
diff --git a/objective-c.html.markdown b/objective-c.html.markdown
index 187ea30a..2b1b3c67 100644
--- a/objective-c.html.markdown
+++ b/objective-c.html.markdown
@@ -11,7 +11,7 @@ filename: LearnObjectiveC.m
Objective-C is the main programming language used by Apple for the OS X and iOS operating systems and their respective frameworks, Cocoa and Cocoa Touch.
It is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.
-```Objective-C
+```cpp
// Single-line comments start with //
/*
@@ -180,7 +180,8 @@ int main (int argc, const char * argv[])
@try
{
// Your statements here
- @throw [NSException exceptionWithName:@"FileNotFoundException" reason:@"File Not Found on System" userInfo:nil];
+ @throw [NSException exceptionWithName:@"FileNotFoundException"
+ reason:@"File Not Found on System" userInfo:nil];
} @catch (NSException * e)
{
NSLog(@"Exception: %@", e);
@@ -198,9 +199,10 @@ int main (int argc, const char * argv[])
// An object is not fully functional until both steps have been completed.
MyClass *myObject = [[MyClass alloc] init];
- // The Objective-C model of object-oriented programming is based on message passing to object instances.
+ // The Objective-C model of object-oriented programming is based on message
+ // passing to object instances.
// In Objective-C one does not simply call a method; one sends a message.
- [myObject instanceMethodWithParmeter:@"Steve Jobs"];
+ [myObject instanceMethodWithParameter:@"Steve Jobs"];
// Clean up the memory you used into your program
[pool drain];
@@ -241,7 +243,7 @@ int main (int argc, const char * argv[])
// - for instance method
- (NSString *)instanceMethodWithParmeter:(NSString *)string;
- (NSNumber *)methodAParameterAsString:(NSString*)string andAParameterAsNumber:(NSNumber *)number;
--
+
@end
// Implement the methods in an implementation (MyClass.m) file:
@@ -291,7 +293,7 @@ int main (int argc, const char * argv[])
* A protocol declares methods that can be implemented by any class.
* Protocols are not classes themselves. They simply define an interface
* that other objects are responsible for implementing.
- * /
+ */
@protocol MyProtocol
- (void)myProtocolMethod;
@end