Custom background for UINavigationBar?

Hi,
how to set a custom background image for the whole navigation bar of a navigation controller? I can't find any appropriate API method.
I tried already to mess around with the views of the UINavigationBar to insert my background view - with the result no not-showing buttons and titles :-/
Also subclassing of UINavigationBar with a new drawRect method does not lead to anywhere - there is simply now way to set the navigation bar for a UINavigationController!
Any help would be highly appreciated!
Best regards,
Matthias Huber

Create a category that extends UINavigationBar:
@implementation UINavigationBar (UINavigationBarCategory)
-(void)setBackgroundImage:(UIImage*)image{
if(image == NULL){ //might be called with NULL argument
return;
UIImageView *aTabBarBackground = [[UIImageView alloc]initWithImage:image];
aTabBarBackground.frame = CGRectMake(0,0,self.frame.size.width,self.frame.size.height);
[self addSubview:aTabBarBackground];
[self sendSubviewToBack:aTabBarBackground];
[aTabBarBackground release];
@end
And call this method from wherever you are initializing your UINavigationController:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
// Initialization code
// Create the navigation and view controllers
SinglePlayerRootViewController *_rootViewController = [[SinglePlayerRootViewController alloc] initWithStyle:UITableViewStyleGrouped];
UINavigationController *_navigationController = [[UINavigationController alloc] initWithRootViewController:_rootViewController];
self.navigationController = _navigationController;
[_navigationController release];
[_rootViewController release];
// set the image for the top navigation bar
[[navigationController navigationBar] setBackgroundImage:[UIImage imageNamed:@"NavigationBarBackgroundTop.png"]];
// Configure and show the window
[self.view addSubview:navigationController.view];
return self;
I hope this helps!
-ML

Similar Messages

  • I am getting ready to sell a Mac app and I want to know what the specs are to create a custom background for my Mac App?

    I am getting ready to sell a Mac app and I want to know what the specs are to create a custom background for my Mac App?
    Here is a good example of what I am talking about: https://docs.google.com/file/d/0B28kNqQ8gmifRjRHam9wVnlrWG8/edit?usp=sharing

    You need to post your question in the Apple Developer Forums

  • [iPhone] Custom background for UITableView

    I'm trying to use a custom background image for a UITableView (or more specifically, I'm using a UITableViewController, but I don't think that really matters because I can access its tableView member). I've tried in Interface Builder but can't figure it out. I'm more comfortable doing my views programmatically anyway.
    Does anyone know how this is done?
    Thanks!

    Create a category that extends UINavigationBar:
    @implementation UINavigationBar (UINavigationBarCategory)
    -(void)setBackgroundImage:(UIImage*)image{
    if(image == NULL){ //might be called with NULL argument
    return;
    UIImageView *aTabBarBackground = [[UIImageView alloc]initWithImage:image];
    aTabBarBackground.frame = CGRectMake(0,0,self.frame.size.width,self.frame.size.height);
    [self addSubview:aTabBarBackground];
    [self sendSubviewToBack:aTabBarBackground];
    [aTabBarBackground release];
    @end
    And call this method from wherever you are initializing your UINavigationController:
    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
    // Initialization code
    // Create the navigation and view controllers
    SinglePlayerRootViewController *_rootViewController = [[SinglePlayerRootViewController alloc] initWithStyle:UITableViewStyleGrouped];
    UINavigationController *_navigationController = [[UINavigationController alloc] initWithRootViewController:_rootViewController];
    self.navigationController = _navigationController;
    [_navigationController release];
    [_rootViewController release];
    // set the image for the top navigation bar
    [[navigationController navigationBar] setBackgroundImage:[UIImage imageNamed:@"NavigationBarBackgroundTop.png"]];
    // Configure and show the window
    [self.view addSubview:navigationController.view];
    return self;
    I hope this helps!
    -ML

  • Image size and dpi for iDVD menu custom background?

    I created a custom background for my iDVD menu. When showing
    on my TV, part of the words and image is cut off on each side, even after adjusting my tv picture between wide screen and standard screen.
    What is the correct size and dpi to make a photograph to use as a background
    image in the menus? This may have been answered before, so I apologize for posting the same question, if so.

    iDVD will try to downsize the image to work, but your TV often will overscan with the result being edges clipped off. The amount of clipping can vary, so the "TV Safe" settings will typically be the center 80-90% of the image. So, if you add a border that makes the image 10-15% larger, that should display the whole image. For example, if you had a 150 dpi image that was 640x480, you could put a 10% border on it so the final image was 704x528.
    John

  • Custom Background image for UITabBar

    I'm trying to implement a custom background for a UITabBar, I am able to add an image view to the tab bar, but for some reason the image is at the top of the view rather than at the bottom. How do I position it correctly? Here is my code.
    UIImage *image = [UIImage imageNamed:@"tabbarbg.png"];
    UIImageView *theImageView = [[UIImageView alloc] initWithImage:image];
    tabBgView = theImageView;
    [tabBarController.view insertSubview:tabBgView atIndex:1];

    Welcome to the forums gravity98...
    Try using Interface Builder's 'Tab Bar Item Size' insets to stretch it accordingly...push the top/bottom values around to see the effect. Make sure to select/hilight the icon you're targeting first.

  • Custom CSS-Applying selected background for all the cols in the report

    Hi,
    I am trying to set a particular background for all the columns in the report(not for all the projects,so that I can avoid option of manually setting background color for complete report.For this I thought custom CSS is best option.So edited custom.css(C:\OBI11g_Middleware\Oracle_BI1\bifoundation\web\app\res\s_blafp\b_mozilla_4) file with below code and went to the Answers-> Criteria->Choose Column->style-> check "Use Custom CSS Class"->MyCell
    Code used in custom.css
    .MyCell { background-color: #00ff00; font-style:italic; font-weight: bold;}
    Somehow I dont see the background color applied to any of the columns in report.Can anyone had successful attempt of this Custom CSS.Thanks in Advance.

    I am trying both the solutions.
    User 979493,
    I started manually writing the code instead of pasting and almost worked.In the mentioned below paths I dont have custom.css file,so I created one and manually entered below code.But does it work for only that particular column and not for all the columns.Is it supposed to work for all the columns or just that column.
    For example: I have 2 cols in the report,I used "Use Custom CSS Class" -> MyCell for the first column and when I ran results it shows background color for only col1 and not for col2.I thought this feature will apply background color for all the columns in the report.Please correct me if I am wrong.
    custom.css file content:
    .MyCell{background-color: #00ff00;font-style:italic;font-weight:bold;}

  • Debug background task in custom workflow for PO change

    Hi,
    We are on ECC 6.0 EHP7.
    I have a custom workflow for PO object type(delegated to std object type BUS2012).
    There is a background task which has some custom code written and I need to debug this code.
    Can someone please let me know how to debug a background task?
    Thanks.

    As suggested by ronen we can debug through swo1 but we have to pass values manually for importing parameters, by using sm50 also we can do debug and there is one more way  to debug
    if its custom task change background  task to fore ground and change business object method also change it to fore ground and activate the work flow.
    now change any  po  then it will stop at that step now take that work item id in swi1 and go to swia and execute after putting break point in that method of business object.
    But best way to debug  through infinite loop i.e sm50.
    suri

  • Custom background image for 7942 IP phones on CCM 6.1.2

    All,
    i am unable to create the custom background images for the Cisco 7942 IP phone, i am running a CCM version 6.1.2. I have uploaded the Image files and also the List.xml file, but when i click on custom images i dont see the image that i uploaded and it say "no selection available". And also after i uploaded the files i have restrated the TFTP services.Have attached the images and List.xml files.Please have a look @ them and let me know if i am missing something here.
    Thanks,
    Rohith

    First off, as this is a CUCM question, you'd be better of over in the IP Telephoney forum (
    https://supportforums.cisco.com/community/netpro/collaboration-voice-video/ip-telephony )
    The thing that jumps out at me is the case of the filename. CUCM Runs on Linux which is case sensitive. Try matching the case.
    If that doesn't help, try looking at the phone logs or Wiresharking the phone.
    GTG

  • Custom Attributes for Scheduled Transactions (Background Jobs)

    Hi,
    I am trying to fetch the custom attributes for scheduled background jobs. Since we are not using the XAcute Queries to run the automatic jobs, we can't use the AUTOBIND property for custom attributes and hence can't fetch them in the scheduled transactions. Is there any way to retrieve the attributes while scheduling a transaction ?
    Thanks,
    Amit Rath

    Hi Amit,
    a way that works: inside your transaction you can call a XML query that reads out the property list for a given user. In the URL of the XML query you can add the user by using the IllumLoginName parameter.
    - create a XML query with the following URL:
    http://<server>:<port>/XMII/PropertyAccessServlet?mode=list&Content-Type=text/xml&IllumLoginName=<User>&IllumLoginPassword=<Password>
    - in your transaction, call the query. You can retrieve the value of the attribute with a XPath expression like this:
    XML_propertyAccessServlet_0.Results{/Rowsets/Rowset/Row[Name='MyAttribute']/Value}
    Interestingly, adding a User / Password in the Scheduler Editor of the job does not work (MII 12.0.2). Maybe this would be also an option for you to try.
    Michael
    Edited by: Michael Otto on Nov 9, 2010 8:27 AM

  • How do I leverage a custom theme for Outlook 2013?

    Microsoft has a problem. They use the term "theme" in Office in 2 different ways: 1) the 3 background colors you can choose of the Office applications and 2) a collection of colors, fonts, and layout that can be customized and defined by the user
    for the applications.
    I know how to create a theme in PowerPoint and save it as a default for all new presentations. Allegedly you can you this across Office applications but this is where it breaks down (as far as my user experience goes).
    I've created a theme in PowerPoint. It has my custom colors. I want to use that same collection in Outlook.
    I can apply it on a email by email basis (Options menu for an email), but I want the default email (new or reply) to use that custom theme. I see my theme in the drop down menu under a heading of Custom, but there isn't a way to set it as default
    (behavior differs from PowerPoint here).
    So I look under the Outlook File menu, then Options and select Mail. You can change stationary, but the custom theme isn't an option there.
    Then there is Styles under the Format Text menu when in a new email. There are color options and font options, but again, no way to leverage the work I did in creating the custom theme.
    Searching on customizing themes for Outlook only gets me answers on the first use of the word theme, not the latter.
    Is there no way to you the theme I created for Outlook 2013?

    Its very simple - if you want a product that remains consistent and does not change its layout every few years, that is fully customizable, and will remain being supported by subsequent operating systems, then get an open source product running in an open
    source OS. It seems that you can no longer rely on MS to provide consistency, stability, or support for their own products. 
    When will MS realise that customer familiarity with their products is their intellectual property, like branding, which you would never trash every five years. Imagine that MS wanted to change their name to a new company name, or their Outlook brand to Inlook
    - it would never happen. So why is thee trade getup and arrangement changing so often and against what their customers want? Is it to justify thee new products? Maybe with cloud and 365, they will finally be happy and stop mucking about with what works (after
    they change everything back to '95 /XP format?).

  • How to run GR55 reports in background for cost center hierarchies

    1.  I have been asked by our users to create batch jobs to run in the background for some GR55 reports, that can then be sent directly to cost center managers via email.
    I have figured out the process to do this as long as the cost center manager only needs to see a single cost center at a time.  However, if they are in charge of multiple cost centers, we also want to send them a summarized report using the hierarchy we have set up.  I can't seem to make this work, as the job only seem to recognize the last cost center in the group and the report is for that cost center.
    Example.  cost centers 100, 200 and 300 belong to hierarchy abc.  If I run the job just for cost center 100 it is fine.  But if I have a variant to run hierarchy abc, or even if I use the range 100 to 300, all I get is a report for cost center 300.
    We cannot use BW because we only have revenue in BW.  I am being asked to make this work from standard R/3 within the GR55 realm of reporting.
    2.  In addition, the report selection criteria includes two separate plan/forecast versions.  They need to update these each month prior to running the reports and sending them out.  I looked at the variables associated with the versions and tried to set them up with default values that I hoped would update automatically so that they don't have to manually change 50 or so variants each month.  But I don't see any dynamic variables that I can use to have the system make that change without going into each variant individually.
    3.  There is another piece to this equation as well.  There is another report they want sent out in batch, but it is several pages wide in SAP and several pages long.  So when you run it in batch and either spool it or get it sent as an email, it is very ugly in the formatting due to all the page splits horizontally and vertically.  If anyone knows how to get the report to stay together like it would if you had excel integration turned on, it would be very helpful.  I have tried running it with that integration turned on, but the jobs are set up with user batch_mgr and not my id, so it isn't working well.  The batch_mgr id is just a system id, not a dialog id.  We also don't want the jobs set up with a regular user id because if people leave, then the jobs all need to be changed.

    Kim,
    I may have options for issues 1 and 2. In case of 3, what I can tell you is I understand the concern, but this is what  typically happens in some standard CO reports that are not ALV compatible, I don't think there is not much  there to do unless you add some custom code for the output.
    In regards to point 1, yes,  I have noticed that this happens in some standard and custom reporting, not sure what is going on. I came up with a work around that  made the trick for my client in a similar scenario; which is editing the cost center groups. For instance, instead  of having the group set as a range from 100 to 300,  the groups are have  listed the cost centers, 100, 200 and 300. Obviously, the disadvantage of  this option is  that it would require a bit of more cost center group maintenance.
    In regards to point 2,  I understand from your note  that your users already have set up selection variants for the report. One option for you is to get the help from a developer to create a custom period variable and tiny program that runs in batch every month that would update that variable accordingly. Once that's done, you may have to update at least once, the selection variant  attributes to change the period to a selection variable, so everytime from that point of time forward that the variable gets updated,  it will be ready with the right value for every selection variant that uses it.
    Hope this helps.
    GG

  • Is it possible to override the built-in PDF format handler with a custom IFilter for PDF?

    Hi,
    SharePoint 2013 comes with a built-in "format handler" for PDF now, so it can index PDF files out of the box. This is great for most users, as it now no longer is necessary to install a third-party IFilter for crawling PDF documents.
    My question is, is it possible to override the built-in format handler for PDF with a custom IFilter for PDF? I played with the Set-SPEnterpriseSearchFileFormatState and Remove-SPEnterpriseSearchFileFormat cmdlets. While it is possible to deactivate
    the built-in format handler, I was not able to remove it and to create a new one that activates a custom IFilter for PDF files.
    Background of the question: While the new built-in format handler for PDF will probably be sufficient for many SharePoint users, some need additional capabilities regarding indexing if PDF documents, e.g. extraction of custom metadata from PDF's document
    information dictionary and embedded XMP metadata. PDFlib GmbH, the company I work form, sells an IFilter for PDF, and of course we would like to continue to offer this for SharePoint 2013.
    Thanks
    Stephan

    You should be able to replace it with any ifilter you want, this is the procedure for installing it:
    Install PDF iFilter 9.0 (64 bit) from
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025 (http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025)
    Download PDF icon picture from Adobe web site
    http://www.adobe.com/misc/linking.html (http://www.adobe.com/misc/linking.html)  and copy to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\IMAGES\
    Add the following entry in docIcon.xml file, which can be found at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\XML
    <Mapping Key="pdf" Value="pdficon_small.png" />
    Add pdf file type on the File Type page under Search Service Application
    Open regedit
    Navigate to the following location:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\15.0\Search\Setup\ContentIndexCommon\Filters\Extension
    Right-click > Click New > Key to create a new key for .pdf
    Add the following GUID in the default value
    {E8978DA6-047F-4E3D-9C78-CDBE46041603}
    •Restart the SharePoint Server Search 15
    •Reboot the SharePoint servers in Farm
    •Create a Test site (with any out-of-box site template) and create a document library upload any sample PDF document(s).
    •Perform FULL Crawl to get search result.
    Once the crawl is completed we will get search results.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Screen enhancement using BADI not workingin background for program RFRECPSFA520

    Hi Gurus,
    I implimented the badi BADI_RECP_SF (Enhancement spot BADI_RE_CP_SF) add custom tab with custom field for additional selection criteria.I used the steps provide in BADI documentation. Everything is working fine but when I run the program in background the additional field values are not comming in the method where I need to filter record. Additional field values are populating fine when I run the program in foreground.
    Does anybody come accross this issue, any input? Is the screen enhancemnets are only for foreground pocessing?
    Thanks,
    Seema

    Le,
    it will lil easy if you can take access key from basis and just add one more selection in selection screen.
    Amit.

  • Determine the customer numbers for which the installations

    Dear All,
    I configured VAR Service Desk on SolMan EhP1 + SPS 20, Everything is good, but I have a problem when run report AI_SC_GET_SAP_CUSTOMER_NUMBERS. It can determine my customer numbers, but have only my installation number in table V_AIINSNRS. There are no any installation number of my customers in table V_AIINSNRS .I need installation number of my customer are included in V_AIINSNRS. Please show me about that. Thank you very much!
    Thanks and Best Regards,
    Tru Hang

    Hello,
    This is the text from the SPRO activity help:
    1.3.9.3.3 Data Transfer from SAP
    Use
    You can copy the following system data from SAP into the System LandscapeMaintenance (SMSY):
    - Name,
    - System number,
    - Installation number
    - Product version.
    All data can be copied from SLD or RFC connection. This is an alternative for service providers who
    have no, or only restricted, connection to their customers via SLD or RFC.
    Requirements
    You have determined or maintained the customer numbers for the systems to be generated.
    Default Settings
    The system automatically generates IBase components, which you need for the Service Desk and Change
    Management scenarios. If you do not want IBase to be generated automatically:
    1. Choose the transaction DNO_CUST04.
    2. Deselect the field: IB_GEN_AUTO (description: Automatic IBase Generation).
    3. Save.
    Activities
    Set Automatic Generation flag
    You can:
    1. Generate all systems per customer number, or
    2. Generate systems per installation number
    Case 1: Flag/check whether all systems with a customer number are to be generated, and maintain the
    maintenance view V_AISAPCUSTNOS. In this case, the system ignores the flag at installation level.
    Case 2:If you select installations for which systems are to be generated, maintain the maintenance view
    V_AIINSNRS.
    Maintain Settings in SMSY_SETUP
    4. Choose: Edit -> Expert Settings.
    5. Enter the value A or N for the option Generate Systems by OSS:
    - A: Systems are only generated if a 3-digit alpha-numeric ID has been specified for the customer
    in maintenance view V_BP_SPC, to distinguish the long names of systems with different
    customer numbers, e.g. a system SOL for the customer SAP would be SOLSAP01.
    - N: New systems are numbered sequentially when they are generated. System SOL would be
    SOL00001.
    6. Save.
    Data is created by background job REFRESH_ADMIN_DATA_FROM_SUPPORT , which
    should be scheduled regularly. If you want to copy the data immediately, you can schedule it
    immediately . Check in the job log of transaction SM37 that it ran successfully.
    Note: The user under which the job runs must be in the table AISUSER , with authorization for
    system data maintenance in the SAP Support Portal.
    I hope this information helps.
    Best regards, 
    Miguel Ariñ

  • How to pass apex item value into custom xml for chart or guage?

    Re-opening the old thread : Re: How to pass apex item value into custom xml for chart or guage?
    Which was not answered.
    Roel - Thanks. Its working - but in a semi quotes in the custom XML
    <pointers>
    <pointer value= '&P5_RUNNING_TOTAL.'
    <label enabled="true">
    <position placement_mode="ByPoint" x="50" y="15" />
    <format>{%Value}{numDecimals:1}</format>
    <background enabled="false" />
    </label>
    </pointer>
    </pointers>This question was helpful for us to resolving one recent thread : AnyChart - set Dial axis intervals dynamically?
    (Re: AnyChart - set Dial axis intervals dynamically?
    Edited by: P.Ranish on Dec 13, 2012 6:23 AM

    P.Ranish wrote:
    Is there any update for this question ???
    Edited by: P.Ranish on Dec 13, 2012 3:36 AMNo, And there won't be in the future.
    Please stop posting followup's to old threads, if you have a real problem please search the forum first and post a new question with all information
    Roel wrote:
    Try using &P5_RUNNING_TOTAL. or #P5_RUNNING_TOTAL#Just to make it clear - this will only work if page is reloaded after setting the item values dynamically via AJAX

Maybe you are looking for

  • Imported images into Iphoto not showing up

    I have just downloaded pictures from my camera and loaded them into Iphoto. When I try to view the pictures some of them show up but others only show as thumbnails. When I click on them to increase the size or edit them, they only show this ! sign. P

  • Dropped phone in toilet and it works?

    So i dropped my phone in the toilet last weekend and let it sit in rice for a week. When i took it out, it wouldn't charge enough to start up all day, but then suddenly started charging and worked completely fine all day. When i went to charge it ton

  • Agent installation stuck on initial stage

    The agent never get installed successfully. It is on initial status forever during installation. After reboot, the agent service does not start. Anyone see this problem.

  • Posting PHP results in Jtable

    Hi. I have a PHP page, which works via GET requests to get data from my Database. It just echo's lines of text, such as This is line 1 This is line 2 I would like my Java Application to be able to read this data, and then populate a Jtable with it. C

  • Error in 9i user export through 10g...

    As i am Exporting 9iR2 Database user through 10g its giving me following error EXP-00056: ORACLE error 6550 encountered ORA-06550: line 1, column 41: PLS-00302: component 'SET_NO_OUTLINES' must be declared ORA-06550: line 1, column 15: PL/SQL: Statem