Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8270783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:41:14+00:00 2026-06-08T06:41:14+00:00

I have a UIActionSheet with title string DO: These tasks. In the title string,

  • 0

I have a UIActionSheet with title string “DO: These tasks”. In the title string, the substring “DO:” should be Bold(with a particular font size) and the substring “These tasks” should be Regular. Is it possible? How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:41:15+00:00Added an answer on June 8, 2026 at 6:41 am

    I assume you have a class which implements the UIActionSheetDelegate protocol and your class is a delegate class of the current UIActionSheet, so in that class you can change the whole title of the UIActionSheet like

    - (void)willPresentActionSheet:(UIActionSheet *)actionSheet {
        for (UIView *_currentView in actionSheet.subviews) {
            if ([_currentView isKindOfClass:[UILabel class]]) {
                [((UILabel *)_currentView) setFont:[UIFont boldSystemFontOfSize:15.f]];
            }
        }
    }
    

    but as far as you see you have no chance to format the part of the UILabel object’s text property.


    you could add a new UILabel for your actionsheet now with a different font, if you want to see a text with the bolded DO: string… but from here the limit is you imagination only, you can format the UIActionSheet‘s elements in this method or inside the -didPresentActionSheet: method as well.

    so this would be the idea for this.

    UPDATE on 7 Oct 2013

    in iOS7 we don’t really have direct access to the subviews of an UIAlertView or an UIActionSheet object, so this solution might not be working properly on iOS7 environment.

    if you have any issue with it on iOS7, please comment it to me! thank you.

    UPDATE on 22 Jun 2014

    I have not found any solution to do such thing directly with the new UIAlertController in iOS8, the title label looks to be not visible in the entire view-hierarchy of the UIAlertController, neither visible before it appears or even after.

    NOTE: I’ve also figured out that it is not forbidden to overlap/cover its content, after it appeared on the screen. currently it is impossible to predict that it will work over Beta or whether or not it is AppStore-safe.

    NOTE: please bear in your mind the view-lifecycle’s schedule, and do not try to present any content in a view or view controler if that is not in the navigation stack already.

    anyway, here is a Swift solution how I could reach the layers and I could add my custom view to it.

    let alertController: UIAlertController = UIAlertController(title: "", message: "", preferredStyle: UIAlertControllerStyle.Alert)
    self.presentViewController(alertController, animated: true, completion: {
        let aboveBlurLayer: UIView = alertController.view.subviews[0] as UIView
        let belowBlurLayer: UIView = (aboveBlurLayer.subviews[0].subviews as Array<AnyObject>)[0] as UIView
        let customView: UIView = UIView(frame: aboveBlurLayer.bounds)
        customView.backgroundColor = UIColor.redColor()
        aboveBlurLayer.addSubview(customView)
        })
    

    NOTE: it might be useful to add custom content to an alert/actionsheet, but if it does not work in the future, I will update my answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got created a UIActionsheet programatically however I can't figure out how to
I have a UIActionSheet that I created Dynamically and it can have a number
I have always wondered but can't find a definitive answer. When should I use
Can someone tell me how do I achieve the UIActionSheet like behavior? I have
I have a UIActionSheet that pops up as soon as the initial view in
I have a UIActionSheet as follows: UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat: @Cancel
I have a UIActionSheet which has options to choose image from Camera or photo
I have this code: UIActionSheet *actionSheet = [[[UIActionSheet alloc] initWithTitle:@Illustrations delegate:self cancelButtonTitle:@Cancel destructiveButtonTitle:nil otherButtonTitles:
I have a UIActionSheet in my app that defaults to having 4 buttons. If
I have a UIActionSheet which I create with the following code. UIActionSheet *popupQuery2 =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.