Giter Club home page Giter Club logo

Comments (4)

JJSaccolo avatar JJSaccolo commented on August 10, 2024

Could you please NSLog your self.image size after the first line where you set the contentMode?

Just do a

NSLog(@"x:%f, y:%f, w:%f, h:%f", self.image.frame.origin.x, self.image.frame.origin.y, self.image.frame.size.width, self.image.frame.size.height);

from uiactivityindicator-for-sdwebimage.

 avatar commented on August 10, 2024

Right after the contentMode line:
x:0.000000, y:44.000000, w:0.000000, h:0.000000
Right after the image is set with the url
x:6.000000, y:2.000000, w:40.000000, h:40.000000

In my story board the second one, 6, 2, 40 ,40 is what I have set for the UIImage box. The odd thing is it seems like it is not initialized or something. Maybe I need to set the frame before I load the setImageWithURL block?

from uiactivityindicator-for-sdwebimage.

 avatar commented on August 10, 2024

aha! Setting the frame before the setImageWithUrl block worked!

[self.image setFrame:CGRectMake(6, 2, 40, 40)];

The weird thing is I wonder why the storyboard wasn't setting this ?
I suspect it has something to do with iOS 6 "autolayout". I never had this issue in iOS5 without autolayout. It seems like ever since I turned that one everything got hosed, but have to support iPhone 5 so.. O well lol

Anyway thanks for the help!

from uiactivityindicator-for-sdwebimage.

JJSaccolo avatar JJSaccolo commented on August 10, 2024

Yes, that was the problem!
The UIActvityIndicatorView is placed in the middle of the UIImageView... so, if the imageView is 0x0, the activityView will be placed in 0/2x0/2 (which is 0x0)!
Glad you solved!

from uiactivityindicator-for-sdwebimage.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.