Discussion Forums  >  WebViews and HTML for Mobile

Replies: 11    Views: 220

shenry
Aspiring developer
Profile
Posts: 469
Reg: Jan 10, 2012
Orange County, ...
13,390
Fourm StarFourm StarFourm Star
01/27/14 01:38 AM (8 years ago)

Web view centering and image size help

I've got this almost exactly how I need it to look, but I can't figure out how to enlarge the image size a bit, and better center the address text. Any ideas on what I'm missing? https://www.dropbox.com/s/bs3u087kgyas1lx/web%20view%20fixes.jpg
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
Fourm StarFourm StarFourm Star
like
01/27/14 01:50 AM (8 years ago)
That code looks familiar :-) Send me the plugin, I'll take a look. David
 
shenry
Aspiring developer
Profile
Posts: 469
Reg: Jan 10, 2012
Orange County, ...
13,390
Fourm StarFourm StarFourm Star
like
01/27/14 02:04 AM (8 years ago)
ha, you recognize some late night BTSD programming? It's on its way.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
Fourm StarFourm StarFourm Star
like
01/27/14 11:30 AM (8 years ago)
Sent over an email :-) Watching David code at 4AM was one of the bigger highlights of Buzzday, ha! Let me know if it works. Cheers! David
 
shenry
Aspiring developer
Profile
Posts: 469
Reg: Jan 10, 2012
Orange County, ...
13,390
Fourm StarFourm StarFourm Star
like
01/27/14 06:36 PM (8 years ago)
Well, I got the address to center using css, but I don't think that's what's locking the image to one size. I've tried all kinds of CSS changes and it only changes the width of the screen, not the image. https://www.dropbox.com/s/q8a0q17sqdandgd/uiwebview%20PM.png What is is now: useHtml = [useHtml stringByAppendingString:@"#image{margin-top:10px;margin-bottom:10px;width:100%;margin-left:auto;margin-right:auto;text-align:center;}"];
 
shenry
Aspiring developer
Profile
Posts: 469
Reg: Jan 10, 2012
Orange County, ...
13,390
Fourm StarFourm StarFourm Star
like
01/27/14 07:22 PM (8 years ago)
I finally got something that looks like it works. There is likely a more elegant way to do this. useHtml = [useHtml stringByAppendingString:[NSString stringWithFormat:@"<div id='image'><img src='%@' style='min-width:300px;margin-left:5px;margin-right:5px;'/></div>", imageLocation]]; Gives me the size I want: https://www.dropbox.com/s/vw6nzdg9plkjpk1/Screen%20Shot%202014-01-27%20at%206.17.17%20PM.png
 
Niraj Shah
buzztouch Evangelist
Profile
Posts: 2942
Reg: Jul 11, 2012
Cerritos
37,920
Fourm StarFourm Star
like
01/27/14 09:10 PM (8 years ago)
Be interesting to see how you will fare with that new plugin I had shown. Tick tock ... The SB app comes first. :-)
 
shenry
Aspiring developer
Profile
Posts: 469
Reg: Jan 10, 2012
Orange County, ...
13,390
Fourm StarFourm StarFourm Star
like
01/27/14 09:16 PM (8 years ago)
That is an amazing app. Have you considered creating a video - mainly because it has so many functions and possibilities. Or maybe just upload the video from San Diego.
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
Fourm StarFourm StarFourm Star
like
01/28/14 11:45 AM (8 years ago)
@Shenry, I've got the video's edited and cued up ready to be uploaded, since others have messaged me for it. When Niraj gives the go ahead I'll create a post to share. I'm meeting Niraj tonight at that ios showcase, I'll speak to him about a video breakdown.
 
shenry
Aspiring developer
Profile
Posts: 469
Reg: Jan 10, 2012
Orange County, ...
13,390
Fourm StarFourm StarFourm Star
like
01/28/14 11:52 AM (8 years ago)
Great. Will there be videos of both of your presentations?
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
Fourm StarFourm StarFourm Star
like
01/28/14 01:47 PM (8 years ago)
@shenry nice job, can't wait to see you as a coding guru :-) David
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
Fourm StarFourm StarFourm Star
like
01/28/14 01:56 PM (8 years ago)
@shenry, yes, minus the stuff Niraj is working on for his company, which I edited out.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.