display image from url using sdwebimage. download
#import "UIImageView+WebCache.h"
UIImageView *imgView=[[UIImageView alloc] initWithFrame:CGRectMake(10, 25, 80, 80)];
imgView.backgroundColor=[UIColor clearColor];
[imgView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",IMAGE_URL,imageUrl]] placeholderImage:[UIImage imageNamed:[NSString stringWithFormat:@"images.png"]]];
imgView.contentMode = UIViewContentModeScaleAspectFit;
[self.view addSubview:imgView];
Thursday, March 16, 2017
ios Webservice class
class for handling webservices download
[[Services sharedInstance]login:usernameTextField.text password:passwordTextField.text andListener:self];
#pragma mark- Service call back method
-(void)ServicesResult:(NSString *)success withResult:(NSDictionary *)result statusCode:(NSString *)statusCode{
if([statusCode isEqualToString:@"200"]){
}
else if([statusCode isEqualToString:@"1"]){
[util alertViewShow:STRING_No_Network_ERROR withTag:0];
}else{
}
}
[[Services sharedInstance]login:usernameTextField.text password:passwordTextField.text andListener:self];
#pragma mark- Service call back method
-(void)ServicesResult:(NSString *)success withResult:(NSDictionary *)result statusCode:(NSString *)statusCode{
if([statusCode isEqualToString:@"200"]){
}
else if([statusCode isEqualToString:@"1"]){
[util alertViewShow:STRING_No_Network_ERROR withTag:0];
}else{
}
}
Subscribe to:
Posts (Atom)