HowTo: Remove Row Bottom Border Line in iOSTable

How can i please remove/hide the line at the bottom of each row/cell in an iOSTable (marked red in the following image) ?

If I remember right, when the iOSTableCellData.Image is high enough, it erases that separator.

Thank you @Michel Bujardet that works like a charm! :slight_smile:

[code] Dim p As New iOSBitmap(table.Width, 1, 1.0)

p.Graphics.FillColor = &cFFFFFF00
p.Graphics.FillRect(0, p.Height, p.Width, p.Height)

cell.Image = p.Image
[/code]

Would it be possible to remove this Line via a Declare or even better, to add a Property to iOSTable for enabling/disabling the Seperator Line and for changing the Style?

UITableView Class Reference: The style for table cells used as separators.

PS: Never created a declare by myself… :confused:

[quote=278946:@Sascha S]Would it be possible to remove this Line via a Declare or even better, to add a Property to iOSTable for enabling/disabling the Seperator Line and for changing the Style?

UITableView Class Reference: The style for table cells used as separators.

PS: Never created a declare by myself… :/[/quote]

There is a declare to change the color of the separator in XojoiOSWrapper. So you could make it white or grey at will.

Here is a Declare taken from <https://xojo.com/issue/44659>.

Just place the following Declare into the OPEN Event of the iOSTable:

// NOTE: Very important to use me.Handle in the following declares because just "handle" points to self.Handle Declare Function NSSelectorFromString lib "Foundation" (selectorName as CFStringRef) as Ptr Declare Function respondsToSelector lib "Foundation" selector "respondsToSelector:"(o as Ptr, sel as Ptr) as Boolean if respondsToSelector(me.handle, NSSelectorFromString("setCellLayoutMarginsFollowReadableWidth:")) then Declare Sub setCellLayoutMarginsFollowReadableWidth lib "UIKit" selector "setCellLayoutMarginsFollowReadableWidth:"(o as Ptr, mode as Boolean) setCellLayoutMarginsFollowReadableWidth(me.handle, False) end if

Thank you @Antonio Rinaldi, @Greg O’Lone and @Michel Bujardet ! :slight_smile:

Ignore my previous Post. The above Code fixes a alignment Issue and is not related to this Forum Thread.

I found the Solution in @Michel Bujardet’s Repo:

Sub SetSeparatorStyle(myIOSTable as iOSTable, Style as integer) ' From Antonio Rinaldi ' Style = 0 no line. 1 = ndefault declare sub setSeparatorStyle lib "UIKit" selector "setSeparatorStyle:"(o as ptr,mode as integer) 'setSeparatorStyle(myIOSTable.handle,0) setSeparatorStyle(myIOSTable.handle,Style) End Sub

Thank you @Michel Bujardet ! :smiley:

You’re welcome Sascha. I am glad it works for you. As noted in the code, the origin is @Antonio Rinaldi .

I just copied the Code and was so exited to finally see my iOSTable they way i wanted to to look like, i did not really read the Comments. :smiley:

Thank you @Antonio Rinaldi too, for sharing this fine Snipped with us. :slight_smile:

This is how it looks like now on a 3.5 iPhone Screen:

You are welcome :slight_smile: