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 9203591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:30:24+00:00 2026-06-17T23:30:24+00:00

I have implemented UISegmentedControl with Direction theme using BASequenceControl from cocoacontrols.com . I have

  • 0

I have implemented UISegmentedControl with Direction theme using BASequenceControl from cocoacontrols.com.

I have added BASequenceControl.h and BASequenceControl.m classes and required images from GitHub

Great. Its working fine for me..However I have a concern with the last segment section tip.

Its displaying the junk space of last segment section.

Original Screen Shot

enter image description here

I need like this

enter image description here

The code I have Implemented

        #import "BASequenceControl.h"

BASequenceControl *bASequenceControl = [[BASequenceControl alloc] init];                                    
bASequenceControl.frame = CGRectMake(10, 10, 200, 44);
[bASequenceControl addSegmentWithTitle:@"First" animated:NO];
[bASequenceControl addSegmentWithTitle:@"Second" animated:NO];

bASequenceControl.leftMargin = -22;
bASequenceControl.rightMargin = 0;
bASequenceControl.overlapWidth = 22;

[self.view addSubview:bASequenceControl];

Any help on this is appreciated.

Thanks.

  • 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-17T23:30:25+00:00Added an answer on June 17, 2026 at 11:30 pm

    This is a pretty simple fix. You will have to edit the BASequenceControl.m file or you can duplicate the class and rename it.

    The line that is causing the problem is in drawRect: it basically draws the grey arrow across the entire background of the control. Creating that nice gradient in the empty space.

    [passiveSegmentImage drawInRect:CGRectMake(-passiveSegmentImage.size.width, 0,
                                               w + 2 * passiveSegmentImage.size.width, h)];
    

    You can change it to:

    [passiveSegmentImage drawInRect:CGRectMake(0, 0,
                                               w, h)];
    

    Now you have to tell the control that it should not be opaque. Update the initializers like this.

    - (void)awakeFromNib {
        _selectedSegmentIndex = -1;
        [self setOpaque:NO];
        [super awakeFromNib];
    }
    
    - (id)init {
        if ((self = [super init])) {
            [self setOpaque:NO];
            _selectedSegmentIndex = -1;
        }
        return self;
    }
    

    This is pretty quick and dirty, you could potentially make this settable with a property. Then submit a pull request to BaseAppKit, but I’ll leave that to you. Here is a gist that you can copy and paste directly in BASequenceControl.m to fix the overhang.
    https://gist.github.com/4632686

    Edit: Make sure that you are using init as the initializer and then setFrame: (I’m not really sure why initWithFrame: wasn’t overridden in the class.)

    BASequenceControl *control = [[BASequenceControl alloc] init];
    [control setFrame:CGRectMake(0, 0, 300, 40)];
    

    Fixed control, green for dramatic effect

    Green background for dramatic effect

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

Sidebar

Related Questions

I have implemented the ThickBox Plugin and I am retrieving the content from using
I have implemented a simple little DSL that generates classes from input files, by
I have implemented correctly bump's api, and added this code: - (void) configureBump {
I have implemented clean URLs using the following in my .htaccess RewriteEngine on RewriteCond
I have implemented a very basic sign up using email address+name, although I would
I have added a UISegmentedControl in my application. None of the buttons are selected
I have implemented FBFriendPickerDelegate in my .h file and using the following delegate to
I have implemented the functionality to remove users from the database in my application.
I have implemented push notification using GCM for my android app. Now i am
I have implemented recurring alarms using the following example However, once an alarm goes

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.