UIWebView as subview in UITableViewCell with dynamic height

459 views
Skip to first unread message

krishna prakash

unread,
Feb 23, 2016, 4:57:54 AM2/23/16
to iphonesdkd...@googlegroups.com
Hi All,

Greetings for the day!!

Can any once suggest or help to solve below problem. I tried lot of ways but no use.

I have  tableviewCells with subviews as "Webview and other buttons”.

I want lo change dynamic height of table view cell based on content. I tried using storing height in dictionaries with key values for index path.row but no use.

Can you please share sample code or Procedure to solve this.


--
Best Regards,
Krishna

Raki iOS Dev

unread,
Feb 23, 2016, 5:18:24 AM2/23/16
to iphonesdkd...@googlegroups.com
Question is not clear. Please add some code or image to understand

Regards,
Rakesh.Y,
iOSDeveloper,
Bangalore,India.
http://beginnersiosdev.blogspot.com/

--
You received this message because you are subscribed to the Google Groups "iPhone SDK Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iphonesdkdevelop...@googlegroups.com.
To post to this group, send email to iphonesdkd...@googlegroups.com.
Visit this group at https://groups.google.com/group/iphonesdkdevelopment.
For more options, visit https://groups.google.com/d/optout.

krishna prakash

unread,
Feb 23, 2016, 5:45:55 AM2/23/16
to iphonesdkd...@googlegroups.com
Thanks for reply Raki,

Please find the image below.

I have a table with N number of cells. In each cell I have Uiwebview and textfield. Based on dynamic content on webview cell size need to change and at end my textfiled should display. I am sending some code. I tried different ways.


Inline image 2

Inline image 1
--
Best Regards,
Krishna Prakash
Ph:+91-8985-128-228

Jesse Tayler

unread,
Feb 23, 2016, 8:18:16 AM2/23/16
to iphonesdkd...@googlegroups.com
I would use automatic layout and make an IBOutlet for the height constraint of the cell.

once you calculate the height, then set the constraint and display the cell contents.

this is not a trivial type of cell to get working and you might also consider using the HTML formatter’s now available which can turn much HTML into attributed text which is then easier to render in a textview.

hope those suggestions help!

On Feb 23, 2016, at 5:45 AM, krishna prakash <prakas...@gmail.com> wrote:

Thanks for reply Raki,

Please find the image below.

I have a table with N number of cells. In each cell I have Uiwebview and textfield. Based on dynamic content on webview cell size need to change and at end my textfiled should display. I am sending some code. I tried different ways.


<Screen Shot 2016-02-23 at 4.19.30 pm.png>

<Screen Shot 2016-02-23 at 4.15.07 pm.png>

krishna prakash

unread,
Feb 23, 2016, 11:17:43 PM2/23/16
to iphonesdkd...@googlegroups.com
Hi Tayler,

I am using auto resizing with story board for hole project. So how can i use autolayouts for single view controller in story board.
Can you please suggests.
Reply all
Reply to author
Forward
0 new messages