Thumbnail slider background color

Dilawer Hussain's Avatar

Dilawer Hussain

02 Apr, 2015 10:14 AM

Hi Support team,

I want to change background color (make a grey transparent color) of thumbnail slider. I can't find an object reference in kit which I can use to change the color.

I can see an other discussion here "http://support.fastpdfkit.com/kb/faq-and-tips/can-i-change-the-mfdo...; but in latest FPK sdk, "DocumentViewController"'s implementation is not open to developer.

Please suggest. Looking forward to a response quickly.
Thanks

  1. Support Staff 1 Posted by Matteo on 02 Apr, 2015 10:43 AM

    Matteo's Avatar

    The controller's toolbarBackgroundImage is used as a background image for the thumbnail and page slider container, which is actually a UIToolbar.

    Default image is a black image with 0.5 alpha or something like that.

  2. 2 Posted by Dilawer Hussain on 02 Apr, 2015 11:03 AM

    Dilawer Hussain's Avatar

    I tried to find the image, but did not find it.

    DocumentViewController is part of fpk core libraries. I am not finding any object from which I can change background color.

    I found "pagedScrollView" which is read only. I tried to use "thumbnailBackgroundColor" property to change color but that is also not helping.

    Please suggest.
    Thanks

  3. Support Staff 3 Posted by Matteo on 02 Apr, 2015 12:51 PM

    Matteo's Avatar

    It is a MFDocumentViewController's property.

    @property (strong, nonatomic) UIImage * toolbarBackgroundImage;

  4. 4 Posted by Dilawer Hussain on 02 Apr, 2015 01:09 PM

    Dilawer Hussain's Avatar

    Hi Matteo,

    I used this property, tried to change image before loading toolbar. Also tried to use after loading toolbar but its not making any difference.

    Please suggest.
    Thanks

  5. Support Staff 5 Posted by Matteo on 03 Apr, 2015 07:43 AM

    Matteo's Avatar

    This is what I got with the following snippet of code

     docViewController.toolbarBackgroundImage = [UIImage imageNamed:@"testToolbarBackground"];
    [self presentViewController:documentViewController animated:true];
    

    where testToolbarBackground is more or less a red png with 0.25 alfa.

    If you are experiencing different results, I can think of a few issues right now:
    - you are running a different version than us. Use the usual NSLog(@"%@", [MFDocumentManager version]) to retrieve it. - the image is somehow wrong. Maybe files with the same name among the resources? - you have some other customization going on that's overriding the toolbarBackgroundImage property. Maybe you are also setting the thumbnailScrollView background to something else, for example?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac