Image table views

Hi all,
I have a basic question about tableviews with user generated photos. I want to create a scrollable table view feed where each cell (the entire cell) is of an image that is uploaded by users, with a editable text box over the image in the tableview (much like the VEVO app tableview on the iphone).
Would I have to create a custom class for this UItableview, or is there already a template for this?

Where should i store the images
Store the image inside the project as 'Resources'.
And how should I place in the table
One method is to add the image by first drawing a CGRect and then placing the image inside...like this:
CGRect myImageRect = CGRectMake(18.0f, 13.0f, 172.0f, 42.0f);
UIImageView *myImage = [[UIImageView alloc] initWithFrame:myImageRect];
[myImage setImage:[UIImage imageNamed:@"allrnd.png"]];
myImage.opaque = YES; // explicitly opaque for performance
self.view addSubview:myImage];
[myImage release];
If you have multiple images, repeat the code block and change the name if myImage to something unique and change the f values shown for placement as required.
Try to get the image as close as possible to the rect they will fill to avoid unnecessarily bloating the project/app size overall. In the example above, the image sits at 18 pixels from the left, 13 pixels down from the top and is 172 wide and 42 tall.
See this doc from Apple for details:
http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Referenc e/CGGeometry/Reference/reference.html

Similar Messages

  • How to set image size in a table view

    Hi,
    I've just built a small VC application showing some process chain logs in a table view. For the different status types Error, Warning and Success I show the well-known traffic light icons. But up to now I haven't found out how to set the image size in a table view (height & width field is greyed out for the table). Any ideas? Or is it just not possible?
    Thanks for your help,
    Heiko

    Hello Heiko,
    I don't know, if it is possible, but I would say,
    it's not implemented yet. Maybe you can change the picture size and use then the pictures, that might be a workaround, if you can't change the height and width in VC.
    Best Regards,
    Marcel

  • Calling a Breadcrumb image inside a Table view column

    Hi
    I want a sample code to call any bread crumb related image inside a table view column.
    Please help with a code snippet.

    I mean that, inside the iterator class of the tableView, write this code in the RENDER_CELL_START method.
    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
      CASE p_column_key.
        WHEN 'ICON'.
    p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY(       id        = p_cell_id                              src      = '@3J@'  ).
        ENDCASE.
    Inside the method, GET_COLUMN_DEFINITIONS you need to append a column for icon, see the code below:
    APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
        <def>-COLUMNNAME = 'ICON'.
        <def>-TITLE      = 'Display Icon'.
    For more info you can refer to weblog on HTMLB TableView Iterator by Brian.
    Hope I am clear.
    Regards,
    Ravikiran.C

  • Resize theb image in the Tab Bar and Table View

    Hi,
    I have image of 64x64.
    I want to resize the image to fit it into Table View and also in the Tabbar.
    I don't want to provide separate images for each.
    Is it possible?

    The mozilla.widget.render-mode preference works in beta 6, but this preference has now been removed from the latest development builds and will not work in beta 7 or later.
    Removed by the part 2 patch for [https://bugzilla.mozilla.org/show_bug.cgi?id=596494 Bug 596494] – Update render mode on device removal

  • How to use a Table View in AppleScriptObjC

    How can I use a table view and add data to it? And how can I display a button cell and image cell in the table? Thanks.

    Hi all,
    Actually i need some more clarification. How to use the same select statement, if i've to use the tabname in the where clause too?
    for ex : select * from (tab_name) where....?
    Can we do inner join on such select statements? If so how?
    Thanks & Regards,
    Mallik.

  • How to replace null as 0 in  obiee11g pivot table view?

    Hi,
    I am using obiee11g pivot table view,
    I have tried so many views but it's not work. My oracle support team also tired but could not solve it
    1.) used BIN method is that measure columns
    2.) ifnull(column name,0)
    3.) case condition:
    Case when columns is NULL then 0 else column end
    4) data formate override custom formate option
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    #,##0;-#,##0;0
    http://obieeelegant.blogspot.com/2011/06/how-to-replace-null-values-in-obiee.html
    Note:
    I don't want to show strike-rate and custom message in that blank cell. I want to show blank cell(null values) as 0 in the obiee11g pivot table view.
    Obiee10g version is working fine only issues in obiee11g
    Thanks in advance...
    Thanks
    Deva

    I tried this on 11.1.1.6.2 but I can't see good results.
    I choose subject area A-Sample Sales and I choose:
    T02 per Name Month on rows
    P1 Product on columns
    Measure : IFNULL("Simple Calculations"."17 Net Costs", 0)
    Prompted Year 2008
    On product Install and 2008/01 there isn't value...and I put Ifnull in my formula...
    My problem is that I want to do a conditional format when Product = Install. So I have all column with background colour except Null values...so is not pretty...
    If I add custom numeric format I can see 0 but not with background colour...
    I add a picture:
    http://imageshack.us/photo/my-images/600/tablegk.jpg/
    Any help about it??
    Is a bug on obiee??
    Edited by: Alex1 on 04-sep-2012 4:28

  • Modify a Table View Header

    I need to modify the header of a tableview and I've tried this:
    .table-view {
        -fx-background-color: rgb(70,70,70);
        -fx-text-fill: white;
        -fx-border-style: solid;
        -fx-border-color: transparent;
    /*    -fx-border-insets: 0 1 1 0, 0 0 0 0;*/
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header{
        -fx-border-style: solid;
        -fx-border-color: rgb(130, 130, 130);
        -fx-border-radius: 5px;
        -fx-background-radius: 5px;
        -fx-border-insets: 0 1 1 0, 0 0 0 0;
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header .label{
        -fx-font-size: 12px;
        -fx-text-fill: white;
    .table-view .column-header-background {
        -fx-background-radius: 5px;
        -fx-font-family: "Calibri";
        -fx-background-color:  rgb(50,50,50);
    }However, I can not edit any table header but only the headers of each column.
    Sorry for the English and grammatical errors. I am Spanish speaking
    I put an image to make it more clear
    http://img823.imageshack.us/img823/49/tableexample.png
    Edited by: biochemistry43 on 30-oct-2012 13:17

    It is there in the CSS documentation, though it's not really very easy to pick out. See http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#tableview and look at the section called "Substructure".
    I'm not claiming that I get everything I need to know from the CSS docs, though. I often need to look at the default stylesheet, caspian.css, which you can extract from the jfxrt.jar file (it's at com/sun/javafx/scene/control/skin/caspian/caspian.css).
    Edited by: James_D on Nov 5, 2012 6:10 AM (fixed path for caspian.css)

  • Permanently set Repeat cell values on table view obiee11g

    Hi,
    By default Analysis presentation Column comes with "Column Value Suppression" but we need to switch "Column Value Suppression" to "Repeat cell values" from source xml reference file
    Note:don't want to do it via analysis table/column properties(its manual work) ..just looking to change permanently by changing xml
    Thanks
    Deva

    Hi,
    What is that datatypeformats.xml ? couldn't find out. once again will explain my requirement
    Creating new analysis(Table/Pivot table view) and applying format as Repeat Cell by changing Table/Pivot Properties to set Enable alternating row "green bar" styling Repeat cell values on table/pivot view (instead of doing manual way)
    Refer the below image --> i just want to avoid manual enabling below Repeat cell option for entire table/pivot view option
    http://i.imgur.com/122wp.jpg?1
    Thanks
    Deva
    Edited by: Devarasu on Nov 26, 2012 5:06 PM

  • Table View Navigation

    I've a table view with one column being an image (clickable). I have 40 rows of records (say for example) and I display 15 at a time in my table view.
    When I navigate to page 3 of my tableview (for example) and click on row to edit (lineedit mode) my view page stays put on page 3 of table view (that's the way it should be). However, after row selection, when I click on my image (which generates a server event and I do my stuff) it goes back to the 1st page of the tableview. The point to note that it does keep the rowselection (on the 3rd page) and changes the icon image as it suppose to but somehow it navigates to the 1st page every time.
    Is there a way to control the navigation?
    Thanks,
    Partho

    I've added
    runtime->keep_context = 1. in my do_handle_event
    and also added
    keepSelectedRow       = "TRUE" in my htmlb:tableview
    but still it navigates to the 1st page.
    It is this section in the render cell iterator
        IF p_edit_mode IS INITIAL.
        ELSE.
           img->onclick = 'image_click'.
        ENDIF.
    which fires the server event and always goes back to the 1st page.
    Please help.
    Thanks,
    Partho

  • Custom Table View

    Hi,
    I want to provide more than three component in the table view.
    Two images/Icons (Left Side), Text with Subtitle, Text (Date and Time at right-hand side)and Detail Disclosure button.
    How can i create this with the custom table view?

    This is an end-user forum. You need
    http://devforums.apple.com

  • How to add button to Table View and initiate action?

    hello,
    i'm new to Javafx 2, i recently followed the tutorial on tableview and would like to add a deletion action on particular row. What i had in mind was to add a delete button on the last column of each row, when clicked it will fire a handler and remove that row from the data observablelist. how do i do that?
    please advice,
    wesley

    Hi,
    Please find the below code. I am creating a table view with two columns. The second column consists of delete button.
    TableVeiw table = new TableView();
    /*First column*/
    final TableColumn<String> titleCol = new TableColumn<String>("Title");
    titleCol.setProperty("title");
    /*Second column*/
    TableColumn<String> actionCol = new TableColumn<String>("Action");
    actionCol.setCellFactory(new Callback<TableColumn<String>, TableCell<String>>() {
          @Override
          public TableCell<String> call(TableColumn<String> param) {
                 final TableCell<String> cell = new TableCell<String>() {
                          @Override
                          public void updateItem(String value, boolean empty) {
                                super.updateItem(value, empty);
                                final VBox vbox = new VBox(5);
                                Image image = new Image(getClass().getResourceAsStream("/images/delete.png"));
                                Button button = new Button("", new ImageView(image));
                                button.getStyleClass().add("deleteButton");
                                final TableCell<String> c = this;
                                button.setOnAction(new EventHandler<ActionEvent>() {
                                      @Override
                                      public void handle(ActionEvent event) {
                                              TableRow tableRow = c.getTableRow();
                                              Item item= (Item) tableRow.getTableView().getItems().get(tableRow.getIndex());
                                              /* TODO : Delete this item from your data list and refresh the table */
                          vbox.getChildren().add(button);
                          setGraphic(vbox);
            cell.setAlignment(Pos.TOP_RIGHT);
            return cell;
    grid.addColumns(titleCol,actionCol);I hope this can help you. :)
    Edited by: Sai Pradeep Dandem on Aug 18, 2011 10:04 PM

  • [iPhone] large table view (500+ elements), each cell with a UIWebView

    Hello, all ...
    I'm developing an application that has to show a table view with 500 (or more) elements in it. Each element has a UIWebView that has to load an image (50x50 pixels in PNG format) from a web server. What i'm finding is that, when this table view is displayed, most of the images don't show up, though a few of them do. I've verified that all of the images are indeed on the web server, but I think that most of the requests fail (perhaps to too many of them going on at once?). Furthermore, the table sometimes scrolls very rough i.e. when an upcoming cell is loading its' image.
    Other iPhone apps seem to do the UIWebView-in-a-cell thing pretty well i.e. Facebook. In the Facebook iPhone app, the table scrolls smoothly, and the images display as they're loaded. How can I make my app behave similarly?
    Regards,
    John
    Falling You - exploring the beauty of voice and sound
    http://www.fallingyou.com

    Hmm ... something still isn't right. The scroll view still scrolls very jerkily, and the reason seems to be that I don't know which delegate method to override to detect when scrolling has finished. I tried overriding -scrollViewDidScroll, like so:
    - (void)scrollViewDidScroll:(UIScrollView *)scrollViewDidScroll
    AlbumViewCell *firstAlbumShown = (AlbumViewCell *)([[self.tableView visibleCells] objectAtIndex:0]);
    AlbumViewCell *lastAlbumShown = (AlbumViewCell *)([[self.tableView visibleCells] lastObject]);
    NSLog(@"scroll view finished scrolling ... first row is %s:%s and the last is %s:%s",
    [[[firstAlbumShown album] albumname] UTF8String],
    [[[firstAlbumShown album] artist] UTF8String],
    [[[lastAlbumShown album] albumname] UTF8String],
    [[[lastAlbumShown album] artist] UTF8String]);
    for (int count = 0; count < [[self.tableView visibleCells] count]; count ++)
    [[[self.tableView visibleCells] objectAtIndex:count] displayAlbumArt];
    ... but when I make one swipe with my finger to scroll the view, I see this in the console log:
    2008-10-21 15:43:52.051 Magnatune[3160:20b] scroll view finished scrolling ... first row is 14 Days:Plunkett and the last is A Celtic Celebration:Da Camera
    2008-10-21 15:43:52.637 Magnatune[3160:20b] scroll view finished scrolling ... first row is 5 and 6 part Fantasies of William Lawes:Oberlin Consort of Viols and the last is Acoustic Abstracts:Heavy Mellow
    2008-10-21 15:43:53.376 Magnatune[3160:20b] scroll view finished scrolling ... first row is Airs De Cour Francais Du XVIIe Siecle:Trio Dafne and the last is Alpha and Oranges:Atomic Opera
    2008-10-21 15:43:54.247 Magnatune[3160:20b] scroll view finished scrolling ... first row is Ambient Excursions:Stargarden and the last is Apa Ya:The Headroom Project
    2008-10-21 15:43:55.041 Magnatune[3160:20b] scroll view finished scrolling ... first row is Ashek:Tim Rayborn and the last is Back with Bach:Ralph Rousseau Meulenbroeks
    2008-10-21 15:43:56.002 Magnatune[3160:20b] scroll view finished scrolling ... first row is Azadi:Junoon and the last is Balance:Solace
    2008-10-21 15:43:56.581 Magnatune[3160:20b] scroll view finished scrolling ... first row is Azadi:Junoon and the last is Balance:Solace
    i.e. -scrollViewDidScroll was called multiple times, even though I only swiped once. I just want to know when the scrolling has truly and completely stopped, so I can tell the visible cells to draw their album art. Which delegate method do I override?
    Regards,
    John
    Falling You - exploring the beauty of voice and sound
    http://www.fallingyou.com

  • Dynamically Hiding Column in a Table View in VC Model

    How to dynamacally hide the columns in a table view in a VC model. Through the expression in Control Property, Form element/field or table view as a whole can be made hidden, however, the individual column can not seem to be hidden.
    I am using VC server version 700.8.0.1.
    Any help would be much appreciated.
    Kind Regards
    Sanjoy

    In this scenario, if the source is SAP BI, you can use the webapi commands. If not, you would have to have 2 separate tables in different layers and you can show and hide those layers or UI elements...

  • Deleting data from a table view

    I have a data source that is in dictionary form (for why, see here). I have the following code that gets called in the commitEditing method for the table view:
    - (void)removeObjectFromListAtIndex:(NSIndexPath *)indexPath {
    NSMutableDictionary *mutableDataDictionary = [[NSMutableDictionary alloc] initWithDictionary:[listContent mutableCopy]];
    dNSLog (@"listContent: %@, mutableDataDictionary: %@", listContent, mutableDataDictionary);
    dNSLog (@"indexPath.section is %d", indexPath.section);
    NSString *section = [[NSString alloc] init];
    switch (indexPath.section) {
    case 0:
    dNSLog (@"Case Zero");
    section = @"A";
    break;
    case 1:
    dNSLog (@"Case One");
    section = @"B";
    break;
    case 2:
    section = @"C";
    break;
    case 3:
    section = @"D";
    break;
    case 4:
    section = @"E";
    break;
    case 5:
    section = @"F";
    break;
    case 6:
    section = @"G";
    break;
    case 7:
    section = @"H";
    break;
    case 8:
    section = @"I";
    break;
    case 9:
    section = @"J";
    break;
    case 10:
    section = @"K";
    break;
    case 11:
    section = @"L";
    break;
    case 12:
    section = @"M";
    break;
    case 13:
    section = @"N";
    break;
    case 14:
    section = @"O";
    break;
    case 15:
    section = @"P";
    break;
    case 16:
    section = @"Q";
    break;
    case 17:
    section = @"R";
    break;
    case 18:
    section = @"S";
    break;
    case 19:
    section = @"T";
    break;
    case 20:
    section = @"U";
    break;
    case 21:
    section = @"V";
    break;
    case 22:
    section = @"W";
    break;
    case 23:
    section = @"X";
    break;
    case 24:
    section = @"Y";
    break;
    case 25:
    section = @"Z";
    break;
    default:
    dNSLog (@"Default");
    section = nil;
    break;
    if (mutableDataDictionary) {
    NSMutableArray *arrayForNameSection = [[[NSMutableArray alloc] initWithArray:[mutableDataDictionary objectForKey:section]] mutableCopy];
    [arrayForNameSection removeObjectAtIndex:indexPath.row];
    NSArray *array = [[NSArray alloc] initWithArray:arrayForNameSection];
    [mutableDataDictionary setObject:array forKey:section];
    listContent = [NSDictionary dictionaryWithDictionary:mutableDataDictionary];
    [array release];
    [arrayForNameSection release];
    [section release];
    [mutableDataDictionary release];
    The code works flawlessly the first time through, but when I try to delete a second item, it crashes with a CALayer exception involving copyWithZone. The analyzer in Xcode (3.2) is telling me something's going on with the NSString section, but I'm not sure what...I'd appreciate any help!
    BTW, Ray if you happen to get this, the code is identical to what I emailed you, except that I added this code. The method name is the same.

    I have a data source that is in dictionary form (for why, see here). I have the following code that gets called in the commitEditing method for the table view:
    - (void)removeObjectFromListAtIndex:(NSIndexPath *)indexPath {
    NSMutableDictionary *mutableDataDictionary = [[NSMutableDictionary alloc] initWithDictionary:[listContent mutableCopy]];
    // What happens to the mutableCopy? Looks like a leak.
    dNSLog (@"listContent: %@, mutableDataDictionary: %@", listContent, mutableDataDictionary);
    dNSLog (@"indexPath.section is %d", indexPath.section);
    NSString *section = [[NSString alloc] init];
    // Memory leak because in all cases you re-assign the variable.
    // Arrrgggg!
    NSString * section = nil;
    if((indexPath.section >= 0) || (indexPath.section < 26))
    section = [NSString stringWithFormat: @"%c", 'A' + indexPath.section];
    switch (indexPath.section) {
    case 0:
    dNSLog (@"Case Zero");
    section = @"A";
    break;
    case 1:
    dNSLog (@"Case One");
    section = @"B";
    break;
    case 2:
    section = @"C";
    break;
    case 3:
    section = @"D";
    break;
    case 4:
    section = @"E";
    break;
    case 5:
    section = @"F";
    break;
    case 6:
    section = @"G";
    break;
    case 7:
    section = @"H";
    break;
    case 8:
    section = @"I";
    break;
    case 9:
    section = @"J";
    break;
    case 10:
    section = @"K";
    break;
    case 11:
    section = @"L";
    break;
    case 12:
    section = @"M";
    break;
    case 13:
    section = @"N";
    break;
    case 14:
    section = @"O";
    break;
    case 15:
    section = @"P";
    break;
    case 16:
    section = @"Q";
    break;
    case 17:
    section = @"R";
    break;
    case 18:
    section = @"S";
    break;
    case 19:
    section = @"T";
    break;
    case 20:
    section = @"U";
    break;
    case 21:
    section = @"V";
    break;
    case 22:
    section = @"W";
    break;
    case 23:
    section = @"X";
    break;
    case 24:
    section = @"Y";
    break;
    case 25:
    section = @"Z";
    break;
    default:
    dNSLog (@"Default");
    section = nil;
    break;
    if (mutableDataDictionary) {
    NSMutableArray *arrayForNameSection = [[[NSMutableArray alloc] initWithArray:[mutableDataDictionary objectForKey:section]] mutableCopy];
    // Get rid of this copy too.
    [arrayForNameSection removeObjectAtIndex:indexPath.row];
    NSArray *array = [[NSArray alloc] initWithArray:arrayForNameSection];
    [mutableDataDictionary setObject:array forKey:section];
    listContent = [NSDictionary dictionaryWithDictionary:mutableDataDictionary];
    // This is autoreleased. You might want to retain it.
    [array release];
    [arrayForNameSection release];
    [section release];
    [mutableDataDictionary release];

  • Error while creating a hyperlink for a field in a table view

    Hi all,
    I have created a table view to display the lead information.Now i wanted to make the lead number to be made as a hyperlink.I have tried the delow code
    <htmlb:tableView id = "tvX"
    headerText = "Leads Details"
    headerVisible = "true"
    design = "alternating"
    visibleRowCount = "5"
    visibleFirstRow = "<%= firstvisiblerow %>"
    fillUpEmptyRows = "true"
    onHeaderClick = "MyEventHeaderClick"
    onRowSelection = "select"
    selectionMode = "singleselect"
    table = "<%= activities %>"
    iterator = "<%= z_it %>"
    sort = "SERVER" >
    <htmlb:tableViewColumns>
    <htmlb:tableViewColumn
    columnName = "object_id"
    type = "link" >
    </htmlb:tableViewColumn>
    </htmlb:tableViewColumns>
    </htmlb:tableView>
    But am getting the following error whlle am activating the code
    Internal error occured during runtime generation
    of Class CL_O2D59X6KFES8AMMPAFQ6AV1R3WF (Dump ID:
    DBIF_REPO_SQL_ERROR).
    When i remove the code for <htmlb:tableViewColumns> this error does not exist
    Can canyone help me in solving this?
    Thanks

    Hi,
    in iterator method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
    you need to call method  cl_hrrcf_iterator=>get_bee_link to define the link for a specific filed.
    for example check the below code.
    IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
      CASE p_column_key.
        WHEN 'PERNR'.
        CALL METHOD cl_hrrcf_iterator=>get_bee_link
            EXPORTING
              p_cell_id       = p_cell_id
              p_onclientclick =link_url
              p_column_key    = p_column_key
              p_row_data_ref  = p_row_data_ref
              p_tooltip_alias = l_alias
            IMPORTING
              po_bee          = p_replacement_bee.
        ENDCASE.
    endmethod.
    vijay

Maybe you are looking for

  • Php form problem and question

    I am a new web designer who is not code savey yet. Anyway during the various sites i have designed i have used 3 different forms that process and email it to me using a seperate php form, 1 in flash, 2 from a standard html form on a windows server. A

  • Question about generic dimension in MDX for Universe

    Hi All,   I'm testing this syntax in MDXtest and works very fine WITH    SET [0COMP_CODE_MEMBERS] AS '[0COMP_CODE].[LEVEL01].members'    MEMBER [0COMP_CODE].[MAX] AS 'Max( [0COMP_CODE].[LEVEL01].members,  [Measures].CurrentMember )'    MEMBER [0COMP_

  • Sudden change in network settings - can no longer access web sites

    All of a sudden, I am no longer able to access any web sites on my Mac Mini. Everything was working fine and then yesterday I tried to get on-line to look something up and it didn't work. I restarted the computer, checked internet connectivity - whic

  • Cfstoredproc

    I am trying to use cfstoreproc to invoke a stored procedure from a CFC. I pass in 2 variables into the cfprocparam but am getting this error: I dumped the 2 invokearguments to make sure they are working and they dump fine. Any ideas why this isn't wo

  • Limiting Primary Administrator Role

    I have a system where the customer wants an audit reviewer to be able to process the audit trail if needed, but not modify any system files, and have an adminstrator that can do everything else but not see the audit trail. Does anyone have any ideas