Skip to content

Instantly share code, notes, and snippets.

@maltzsama
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save maltzsama/9573652 to your computer and use it in GitHub Desktop.

Select an option

Save maltzsama/9573652 to your computer and use it in GitHub Desktop.
class method
#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;
}
#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