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

  • Home
  • SEARCH
  • 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 3940614
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:26:26+00:00 2026-05-20T00:26:26+00:00

I have this problem: if I use a uidatepicker, everything goes fine: I have

  • 0

I have this problem:
if I use a uidatepicker, everything goes fine:
I have this code:

datePickerView.frame = CGRectMake(0, 264, 320, 216);
datePickerView.bounds = CGRectMake(0, -108, 320, 216);

and the datepicker is half on the bottom (like I want ( only for test))

but if I use a uipickerview, and I use the same code:

genderPickerView.frame = CGRectMake(0, 264, 320, 216);
genderPickerView.bounds = CGRectMake(0, -108, 320, 216);

but the pickerview is on the bottom, not half on the bottom like the datepicker…
what’s the problem??
thanks in advance!

  • 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-05-20T00:26:26+00:00Added an answer on May 20, 2026 at 12:26 am

    Its because you have changed the drawing bounds of the view. I suppose the answer to why it is different between picker views is due to the actual implementation of each control – one must draw at the bounds origin, whilst the other the frame origin.

    By setting the y origin of the bounds to -108 the drawable area origin of the view is now 108 pixels above the actual view position. in general you never want to set the origin on the bounds especially when you dont own the control. Just use frame position: 0,156, 320, 216 and they should both behave the same.

    for a good explanation of when you should use frame, bounds or center view properties, see UIView's frame, bounds, center, origin, when to use what?

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

Sidebar

Related Questions

I have hit upon this problem about whether to use bignums in my language
I have this .bat script which I use to maven package my application. Problem
I'm doing a Microsoft Surface Application and I have this problem: I use the
I have this problem when I try to use script/generate: $ script/generate start /Users/gst/.gem/ruby/1.8/gems/hpricot-0.8.1/lib/fast_xs.bundle:
I have this problem. I have a module (module 1) that use Nhibernate to
Ok I have this problem I'm trying to use Jquery to load a partial
I have this problem I'm hoping someone knows the answer to. I have an
everybody; I have this problem in asp.net, I have a page where I insert
I have seen this problem arise in many different circumstances and would like to
I have faced this problem quite often during the last couple of months, during

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.