How to increase space between two buttons in iphone

Hi Iam creating 10 uibuttons dynamically and animate randomly. but any of two or four buttons are overlapped.
plz tell me the solution.
i have the following code in my ipad app:
-(void)AnimateNumbers
    for(NSMutableDictionary *dict in self.buttonArray)
        UIButton *but=[dict objectForKey:@"Button"];
        CGPoint bcenter=but.center;
        int numx=[[dict objectForKey:@"Xvalue"]intValue];
        int numy=[[dict objectForKey:@"Yvalue"]intValue];
        bcenter.x+=numx;
        bcenter.y+=numy;
        //bcenter.x=bcenter.x+[dict objectForKey:@"Xvalue"];
        //bcenter.y=bcenter.y+[dict objectForKey:@"Yvalue"];
        but.center=bcenter;
        //if(uia)
         BOOL isPortrait = UIDeviceOrientationIsPortrait(self.interfaceOrientation);
        //NSLog(@"is portrait %@",isPortrait);
        //if(isPortrait)
            //NSLog(@"is portrait");
        if(isPortrait)
            if(bcenter.x>720)
                [dict setValue:[NSNumber numberWithInt:-15] forKey:@"Xvalue"];
            if(bcenter.y>900)
                [dict setValue:[NSNumber numberWithInt:-15] forKey:@"Yvalue"];
            if(bcenter.x<100)
                [dict setValue:[NSNumber numberWithInt:35+but.tag] forKey:@"Xvalue"];
            if(bcenter.y<222)
                [dict setValue:[NSNumber numberWithInt:35+but.tag] forKey:@"Yvalue"];
            self.correctwrongImageView.frame=CGRectMake(214,450,253,201);
        else {
            if(bcenter.x>900)
                [dict setValue:[NSNumber numberWithInt:-15] forKey:@"Xvalue"];
            if(bcenter.y>720)
                [dict setValue:[NSNumber numberWithInt:-15] forKey:@"Yvalue"];
            if(bcenter.x<100)
                [dict setValue:[NSNumber numberWithInt:35] forKey:@"Xvalue"];
            if(bcenter.y<222)
                [dict setValue:[NSNumber numberWithInt:35] forKey:@"Yvalue"];
            self.correctwrongImageView.frame=CGRectMake(362,351,253,201);
            //self.resultview.frame=CGRectMake(362,351,253,201);
Thanks.

You might get better responses posting this to the developers forum.

Similar Messages

  • How to get space between two values in a single cell of a table.

    hello,
            how to get space between two values in a single cell of a table.
    thanks a lot.
    kailash.

    sorry i got the answer.

  • How can i set the space between two button?

    Hello,
    I have
    <mx:HBox>
    <mx:Button label="one" />
    <mx:Button label="two" />
    </mx:HBox>
    how can i set the distance between this two compotents?
    Thanks

    quote:
    Originally posted by:
    robinbouc77
    Hi,
    you can use horizontalGap property on HBox to change the
    space between your buttons. I think the default value is 6. You can
    also use <mx:Spacer/>, but changing the gap on HBox is
    probably the cleanest way ;)
    C U
    perfect!!! works fine

  • How to remove space between two fields in emergency primary contact.

    How Can I remove a space between the two fields.IN emergency primary contact there are certain field called "C/O" and a i have added one text for this field inside that.But it is taking a big space between the "C/O" field and the text view.Plz suggest how I can re,move this?Also How Can I add new transparent container  with the end user personalization in the emergency contact field.

    Hi Peddi
    In my structure pannel I have simpleSearchPanel below that only i have the two lov fields ex: emp_no and emp_name . how to set the spacer between this From which Region where can find the spacer bean what proerty do i need to set
    Thanks
    AT

  • How to provide space between two tabs in a tabbed pane using Swings?

    I want to place two tabs on a tabbed pane with a specified gap in between. How to give the space between them. Please suggest me how to implment this.
    Thanks in advance.

    set your own UI, overriding paintTab(..) to add 5 (or whatever gap) to each of rects.x

  • Flex charts: How to increase space between columns?

    Hello!
    I just added columnWidthRatio: 1; to my mx|ColumnChart to fatten up my columns a little. But now, there's no space between the X axis and columns, and between the columns themselves, so how do I increase this space?
    mx|ColumnChart { marginRight: "50"; paddingRight: "50"; } has no effect.
    Thanks!
    --Dwayne

    Somehow setting width="400" did not change anything. I also tried:
    mx|ColumnChart { columnWidthRatio: 0.8; width: 1000; columnWidth: 1000; }
    to no avail.
    Anyhow, I've reduced my columnWidthRatio to 0.8 though as you suggested. It looks better, but I'd still like some more space between the columns.
    Thanks!
    --Dwayne

  • Contact Sheet X v2.1 - how to increase space between caption & images?

    Contact Sheet X v2.1 has been working very well. But I can't find a way to increase the spacing between the captions and the images. They're practically touching. From time to time I need to move elements of the proof sheet. The dialog box for Contact Sheet X v2.1 doesn't appear to have anything to control the distance between caption and image. Does anyone have a solution? Using Photoshop CC, Mac OSX 10.9.5. Thank you.

    Somehow setting width="400" did not change anything. I also tried:
    mx|ColumnChart { columnWidthRatio: 0.8; width: 1000; columnWidth: 1000; }
    to no avail.
    Anyhow, I've reduced my columnWidthRatio to 0.8 though as you suggested. It looks better, but I'd still like some more space between the columns.
    Thanks!
    --Dwayne

  • How to add space between two tabs in accodion widget?

    Hi! I am using the accordion widgets and trying to add space between each of the tabs, would someone help me on this. Thanks

    Directly editing the output of Muse is virtually always a bad idea. At a minimum it will create a very cumbersome workflow since Muse will overwrite your changes every time you re-export (export, upload, publish, preview).
    It depends on exactly what visual effect you want to achieve, but you probably just need to select the accordion widget and use the Spacing panel to adjust the vertical gutter value.

  • How draw a line between two buttons?

    Hi.
    I want to make two movable buttons connected  with a line. When changing position of any button you'll change look of  the line of course.  I know how to draw a line but after MOUSE_DOWN, and  I don't know how to remove an old one line, and how make this line to  be shown all the time?
    My code
    btn2.addEventListener(MouseEvent.MOUSE_DOWN,
    mouseDownHandler3);
    btn2.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler3);
    btn3.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler3);
    btn3.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler3);
    // Define a mouse down handler (user is dragging)
    function mouseDownHandler3(evt:MouseEvent):void {
       var object = evt.target;
       // we should limit dragging to the area inside the canvas
       object.startDrag();
    function mouseUpHandler3(evt:MouseEvent):void {
       var obj = evt.target;
          obj.stopDrag();
          //spisujemy x,y
          var x2Pos:Number = btn2.x;
          var y2Pos:Number = btn2.y;
          var x3Pos:Number = btn3.x;
          var y3Pos:Number = btn3.y;
          trace (x3Pos);
          trace (y3Pos);
          var roundObject:Shape = new Shape();
          roundObject.graphics.lineStyle(2, 0x990000, .75);
          roundObject.graphics.moveTo(x2Pos, y2Pos);
          roundObject.graphics.lineTo(x3Pos, y3Pos);
          this.addChild(roundObject);
          //this.removeChild(this.getChildAt(this.numChildren -1));
    Source .FLA: http://www.mediafire.com/?y2tyzz4zxun

    Here's a solution that you can adapt for two or more buttons....
    var btns:Array = [btn2, btn3]; //instances on stage
    //set btn handlers
    function setBtns():void {
          for(var i=0; i<btns.length; i++) {
                btns[i].buttonMode = true;
                btns[i].addEventListener(MouseEvent.MOUSE_DOWN, grab);
                btns[i].addEventListener(MouseEvent.MOUSE_UP, drop);
    setBtns();
    //draws lines btween all btns while a drag is occurring
    function drawLines(e:Event=null):void {
          graphics.clear();
          graphics.lineStyle(2, 0xFF0000);
          graphics.moveTo(btns[0].x+(btns[0].width/2), btns[0].y+(btns[0].height/2));
          for(var j=btns.length-1; j>=1; j--) {
                graphics.lineTo(btns[j].x+(btns[j].width/2), btns[j].y+(btns[j].height/2));
    //handlers
    function grab(event:MouseEvent):void {
          event.target.startDrag();
          addEventListener(Event.ENTER_FRAME, drawLines);
    function drop(event:MouseEvent):void {
        event.target.stopDrag();
        removeEventListener(Event.ENTER_FRAME, drawLines);
    drawLines();

  • PO Stylesheet How to remove space between two tables

    Hi
    I am building a rtf template for PO output for communication report in r12,there is a terms and conditions part and total amount part which comes at bottom of every page of the report. I have created that as a template and i call it in the footer.
    The problem is there is always a gap between the lines table and the terms & conditions and total table,any idea's on how to resolve this issue will be very helpful.
    Please let me know if any other input is required from my side.
    Thanks in Advance

    Are you trying to have the table where the lines are always be the same size no matter how many lines are present?
    If so, you some choices:
    1) If your lines are always the same height, you might get some ideas on what to do from this article:
    http://oracle.anilpassi.com/xml-publisher-developing-reports-printed-on-pre-printed-stationary.html
    2) If your lines vary in height, then you should look into a PDF template. This will give you a pre-printed stationary look in which the drawing of boxes and lines is not affected by the data content.
    3) Other less attractive options are a) making the report in XSL-FO, and b) making a bitmapped RDF report
    There is currently no solution that I am aware of for a pre-printed stationary look using an RTF template in which the data lines are of variable height.

  • Adding space between a buttons in a navigation list

    Hello,
    I am currently using apex 3.2.1 with a 10g backend. All of my forms are using a button list navigation. On one of my forms, I want to add more space between two buttons. Is this possible?
    Thanks,
    Mary

    That doesn't work for a button list navigation. It just makes the button bigger. I need space between two of the list entries in the navigation.
    Thanks,
    Mary

  • How to remove white space between two answer reports

    How to remove white space between two answer reports
    In Dashboard section I have 2 rqeuest. Each request renders Table View. When I display dashboard, it show white space separating the 2 table views. How do I get rid of the white space/white band ?

    See this link
    Re: Eliminating the space between two reports in OBIEE dashboard page Section
    Regards,
    Sandeep

  • How to eliminate the space between two analysis in the Dashboard?

    Hi All,
    I have created a Dashboard which contains 12 analyses arranged vertically. When i see the report in the dashboard section it contains some standard space between each analysis. So it looks like separate separate analysis arranged in dashboard. But i want it to look a single table is it possible by reducing the space between every analysis? If possible please let me know how to achieve this in clear manner.
    Awaiting your valuable responses.
    Thanks in Advance
    Thenmozhi

    Hi,
    Yes,try to adjust the analysis view (table/pivot/chart view )Formating option...
    FYI: try to align formating left,right,top/bottom padding and also try to reduce the width and height..
    Please refer the below
    Re: Eliminating the space between two reports in OBIEE dashboard page Section
    THanks
    Deva

  • How in the heck did the spaces between the buttons get in there?

    Hello,
    Go to this link:  http://www.peterdanko.com/peterdanko.com/gb_installation2.html#  Note the white spaces between the buttons.  They are not supposed to be there.  All margins/borders are set to zero.  Then, because of this white space, the last button gets tossed into the great cyber void.
    What am I doing wrong? and how come when I used this same structure on other pages it worked perfectly?
    Thanks,

    Hi Peter,
    about hotspots: you only need to build an image with your buttons (I made it at the moment with 5 so that I can send it here), like this:
    Then you have to insert this image in your DW file, a menu opens, which looks like this (German DW):
    Now you can do 10 overlays with these green (rectangle) areas and assign each aerea with a link.
    Hans-G.

  • How to remove/reduce the default space between two sections ?

    How to remove/reduce the default space between two sections on the dashboards?

    if you make a modification of the Dashboardlayout in the file PortalContent.css like
    .SectionTable {
    margin-bottom: 2px;
    width: 100%;
    border-width: 1px;
    border-style: none;
    border-color: #CECECE;
    There will be no more borders. However the gap exists but the look of the 2-section report might look better.
    There is an ER raised at the Oracle Support.
    Enhancement 5655489: ABILITY FOR USERS TO CONTROL THE GAP LENGTH BETWEEN REPORTS AND SECTIONS
    Hope it helps you..
    Regards,
    Raghu

Maybe you are looking for

  • How do I stop Firefox from automatically signing in every time I restart

    About a week ago, Firefox started automatically signing in whenever I have restarted or shutdown and then turned laptop back on again. After the usual icons and stuff has reappeared on desktop, suddenly Firefox starts opening/signing in, without my a

  • My iPhone 4s is no longer working.

    My iPhone 4s is no longer working. It kept turning off and on on it's own and i tried to restore it. I pressed the lock and home button. I connected it to itunes as it says. Once in itunes it says the iPhone is on recovery mode and then when it is su

  • Hard Drive no longer recognized. Input Output Error.

    Recently my iBook G4 1.0 Ghz, has stopped recognizing my hard drive. I have taken the hard drive out of the computer, erased it 35 times and reinstalled OSX 10.4 with all the updates. The hard drive runs very smooth. No clicks or problems associated

  • Dropdown not working

    Hi Every one..., In my Machine dropdown function is not working. example is in T.code like MM01 (Creation of Material Master) I could not able to select Industrial sector, material type, now values are displaying. If with same user ID, I could able t

  • Facebook appears in mobile phone format when running in firefox on my PC

    facebook started playing up by first not displaying profile pictures, could no longer access chat or message facility. Next time it showed facebook like it is on a mobile phone screen. no graphics just plain text down left side of the screen. this st