Last active
August 29, 2015 13:57
-
-
Save maltzsama/9573652 to your computer and use it in GitHub Desktop.
class method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "CompositURL.h" | |
| #import "Defines.h" | |
| @implementation CompositURL | |
| //Composit URL Programation | |
| + (NSURL *) compositWithStr:(NSString *)strUrl{ | |
| NSString *strUrl = @"host"; | |
| strUrl = [strUrl stringByAppendingFormat:@"%@.json",strUrl]; | |
| NSURL *url = [[NSURL alloc]initWithString:strUrl]; | |
| return url; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "Test.h" | |
| #import "CompositURL.h" | |
| @implementation Test | |
| //Composit URL Programation | |
| - (void)someMethod{ | |
| NSURL *url = [CompositeURL compositWithStr:@"tesst"]; | |
| //do what you want | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment