Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code> NSURL *url=[NSURL URLWithString:urlUTF8]; NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url]; [NSURLConnection sendAsynchronousRequest:urlRequest queue:[NSOperationQueue currentQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { UIImage *imagemain=[UIImage imageWithData:data]; // CGSize size=imagemain.size; //compulsary you have to give resize the image..... UIImage *compimage=[self resizeImage:imagemain resizeSize:CGSizeMake(45,45)]; Cell.imgProfile.image=compimage; // CGSize size1=compimage.size; }]; this is perfect code for image loading in tableview cell....... for Resizing Method -(UIImage *) resizeImage:(UIImage *)orginalImage resizeSize:(CGSize)size { CGFloat actualHeight = orginalImage.size.height; CGFloat actualWidth = orginalImage.size.width; // if(actualWidth &lt;= size.width &amp;&amp; actualHeight&lt;=size.height) // { // return orginalImage; // } float oldRatio = actualWidth/actualHeight; float newRatio = size.width/size.height; if(oldRatio &lt; newRatio) { oldRatio = size.height/actualHeight; actualWidth = oldRatio * actualWidth; actualHeight = size.height; } else { oldRatio = size.width/actualWidth; actualHeight = oldRatio * actualHeight; actualWidth = size.width; } CGRect rect = CGRectMake(0.0,0.0,actualWidth,actualHeight); UIGraphicsBeginImageContext(rect.size); [orginalImage drawInRect:rect]; orginalImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return orginalImage; </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload