Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show image from url #4

Closed
maorbenamer opened this issue Oct 11, 2013 · 5 comments
Closed

Show image from url #4

maorbenamer opened this issue Oct 11, 2013 · 5 comments

Comments

@maorbenamer
Copy link

Hi,
I need help to show an image from a URL in the popup window.
could you please help with the code?

@icanzilb
Copy link
Owner

what have you tried so far?

@maorbenamer
Copy link
Author

Ive get an image from URL and called it *data.
and then I tried this code:

//show local file
MTPopupWindow* winPop = [MTPopupWindow alloc]init];
UIImage *image = [UIImage imageWithData:data];
UIColor *c = [UIColor colorWithPatternImage:image];
winPop.backgroundColor = c;

@icanzilb
Copy link
Owner

I have problems to understand why do you do that ... The popup window meant to show an HTML file - that's why it uses a web view control to show the content.

Btw - did you try to just pass the URL to the image to showWindowWithHTMLFile: ? I guess if you do that it'll just take the image URL and show it in the web view control.

@maorbenamer
Copy link
Author

Thanks!

I tried to enter the image URL to showWindowWithHTMLFile: and its work.
but, could i stretch the image to the popup size?

@icanzilb
Copy link
Owner

not automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants