wait_fences:未能在 iPhone 中收到回复:10004003

发布于 2024-09-14 04:29:34 字数 231 浏览 1 评论 0原文

我正在 iPad 上开发一个应用程序来阅读和注释 pdf。我的应用程序在纵向/横向模式下工作正常,但是当我旋转设备或模拟器时,它给我一个奇怪的错误wait_fences:无法接收回复:10004003 每当我从横向旋转到纵向或从纵向旋转到横向时。

有时我的应用程序崩溃,有时由于此错误而无法正常旋转。 我用谷歌搜索了 wait_fences 但我什么也没得到。

谁能帮我解决这个问题吗? 提前致谢。

i am developing an application on ipad to read and annotate pdf's.My application is working fine in Portrait/landscape mode but when I rotates the device or simulator its giving me weired error wait_fences: failed to receive reply: 10004003 whenever i rotates either from landscape to portrait or from portrait to landscape.

some times my app is crashing and sometimes its not rotating properly because of this error.
i googled about wait_fences but i didnt get anything.

can anyone please help me on this.
Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神魇的王 2024-09-21 04:29:35

在这里,您在 willAnimateRotationToInterfaceOrientation 方法中执行以下操作。

if([objGoToPagePopOverController isPopoverVisible])
{
    [objGoToPagePopOverController dismissPopoverAnimated:YES];
}

因此,这里不是直接调用这个“dismissPopoverAnimated”方法,而是创建一个自定义方法“Remove_Popover”并在计时器中调用它,如下所示:

[NSTimer scheduledTimerWithTimeInterval:0.001 target:self selector:@selector(Remove_Popover) userInfo:nil repeats:NO];

当您将dismissPopoverAnimated代码放入willAnimateRotationToInterfaceOrientation方法中时,在NSTimer中调用此方法。只需制作您自己的自定义方法,如下所示:

- (void)Remove_Popover
{
    if([objGoToPagePopOverController isPopoverVisible])
    {
        [objGoToPagePopOverController dismissPopoverAnimated:YES];
    }
}

如果您能解决问题,请告诉我。

Here you are doing the following things in the method willAnimateRotationToInterfaceOrientation.

if([objGoToPagePopOverController isPopoverVisible])
{
    [objGoToPagePopOverController dismissPopoverAnimated:YES];
}

So, Here instead of calling this "dismissPopoverAnimated" method directly, make one custom method "Remove_Popover" and call that in timer like as follows:

[NSTimer scheduledTimerWithTimeInterval:0.001 target:self selector:@selector(Remove_Popover) userInfo:nil repeats:NO];

Call this method in NSTimer when you put the dismissPopoverAnimated code inside the willAnimateRotationToInterfaceOrientation method. And just make your own custom method as follows:

- (void)Remove_Popover
{
    if([objGoToPagePopOverController isPopoverVisible])
    {
        [objGoToPagePopOverController dismissPopoverAnimated:YES];
    }
}

Let me know if you can solve the issue.

蓝海 2024-09-21 04:29:35

使用 willRotateToInterfaceOrientation 我称之为我的神话,我为所有 UI 元素设置横向和纵向矩形

-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
    delegate.currentOrientation = toInterfaceOrientation;
    [self landscapePortraitOrientation];
}



- (void) landscapePortraitOrientation
{
    CGRect scriptPageViewRect = delegate.objNewWindow.frame;
    scriptPageViewRect.origin.x = 0.0;
    scriptPageViewRect.origin.y = 0.0;

    if((delegate.currentOrientation == UIInterfaceOrientationLandscapeLeft )|| (delegate.currentOrientation == UIInterfaceOrientationLandscapeRight))
    {

        searchMenus.frame = CGRectMake(824, 634, 400, 55);      
        currPage.frame = CGRectMake( 0.0, 0.0, 1004.0, 768.0);          //( 0.0, 0.0, 798.0, 1024.0);  //( 138.0, -140.0, 768.0, 1004.0)
        tiledLayerSize = tiledLayerSizeLandscape;

        // Customising go to page slider
        CGAffineTransform trans = CGAffineTransformMakeRotation (M_PI * 0.5);
        goToPageSlider.transform = trans;
        goToPageSlider.minimumValue = 1;
        goToPageSlider.maximumValue = totalNoOfScriptPages;
        goToPageSlider.frame = CGRectMake(15.0,90.0, 50.0, 550.0);


        CGRect frame4=backButtonOutlet.frame;
        frame4.origin.x=8;
        frame4.origin.y=4;
        frame4.size.width=69;
        frame4.size.height=35;
        backButtonOutlet.frame=frame4;  

        CGRect frame5=pdfPageTopBar.frame;
        frame5.origin.x = 0;
        frame5.origin.y = 0;
        frame5.size.width = 1024;
        frame5.size.height = 44;
        pdfPageTopBar.frame = frame5;       


        CGRect frame6=pdfTitleOutlet.frame;
        frame6.origin.x=319;
        pdfTitleOutlet.frame=frame6;        

        CGRect frame7=helpButtonOutlet.frame;
        frame7.origin.x=928;
        frame7.origin.y=3;
        frame7.size.width = 76;
        frame7.size.height = 36;
        helpButtonOutlet.frame=frame7;

        CGRect frame9=modeSwitchBtnImage.frame;
        frame9.origin.x=818;
        modeSwitchBtnImage.frame=frame9;


        CGRect frame10=pdfPageBottomBar.frame;
        frame10.origin.x = -3;
        frame10.origin.y = 675;
        frame10.size.width = 1028;
        frame10.size.height = 74;
        pdfPageBottomBar.frame=frame10;


        CGRect frame13=gotoPageButtonOutlet.frame;
        frame13.origin.x = 504;
        frame13.origin.y = 675;
        gotoPageButtonOutlet.frame = frame13;

        CGRect frame17=searchButtonOutlet.frame;
        frame17.origin.x=314;
        frame17.origin.y=675;
        searchButtonOutlet.frame=frame17;

        CGRect frame18=viewAllCommentsButtonOutlet.frame;
        frame18.origin.x=696;
        frame18.origin.y=675;
        viewAllCommentsButtonOutlet.frame=frame18;

        CGRect frame19=commentsButtonOutlet.frame;
        frame19.origin.x=125;
        frame19.origin.y=675;       
        commentsButtonOutlet.frame=frame19;     


        CGRect frame14=modeSwitchBtnOutlet.frame;
        frame14.origin.x=818;
        modeSwitchBtnOutlet.frame=frame14;

        CGRect frameDoneBtn = commentDoneButtonOutlet.frame;
        frameDoneBtn.origin.x = 835;
        commentDoneButtonOutlet.frame = frameDoneBtn;

        if([objGoToPagePopOverController isPopoverVisible])
        {
            [objGoToPagePopOverController dismissPopoverAnimated:YES];
        }

        //for comments
        if(commentsView.hidden == NO && isKeyBoardShown == YES)
        {CGRect commentsViewFrame = CGRectMake(0,200,1024,205);
            commentsView.frame = commentsViewFrame;
            CGRect pageTextCommentsFrame = pageTextComments.frame;
            pageTextCommentsFrame.origin.x = 20;
            pageTextCommentsFrame.size.width = 986;
            pageTextCommentsFrame.size.height = 120;
            pageTextComments.frame = pageTextCommentsFrame;
        }
        else if(commentsView.hidden == NO && isKeyBoardShown == NO)
        {

            CGRect commentsViewFrame = CGRectMake(0,380,1024,300);
            commentsView.frame = commentsViewFrame;

            CGRect pageTextCommentsFrame = pageTextComments.frame;
            pageTextCommentsFrame.origin.x = 20;
            pageTextCommentsFrame.size.width = 980;
            pageTextCommentsFrame.size.height = 220;
            pageTextComments.frame = pageTextCommentsFrame;

        }

        // Initialising top & bottm bar elements show rect
        topBarShowRect = pdfPageTopBar.frame;
        bottomBarShowRect = pdfPageBottomBar.frame;
        backButtonShowRect = backButtonOutlet.frame;
        topBarTitleLabelShowRect = pdfTitleOutlet.frame;
        searchButtonShowRect = searchButtonOutlet.frame;
        helpButtonShowRect = helpButtonOutlet.frame;
        gotoPageButtonShowRect = gotoPageButtonOutlet.frame;
        gotoSliderShowRect = goToPageSlider.frame;
        commentsButtonShowRect = commentsButtonOutlet.frame;
        viewAllButtonShowRect = viewAllCommentsButtonOutlet.frame;


        // Initialising top & bottom bar elements hide rect
        topBarHideRect = pdfPageTopBar.frame;
        backButtonHideRect = backButtonOutlet.frame;
        topBarTitleLabelHideRect = pdfTitleOutlet.frame;
        searchButtonHideRect = searchButtonOutlet.frame;
        bottomBarHideRect = pdfPageBottomBar.frame;
        helpButtonHideRect = helpButtonOutlet.frame;
        gotoPageButtonHideRect = gotoPageButtonOutlet.frame;
        gotoSliderHideRect = goToPageSlider.frame;
        commentsButtonHideRect = commentsButtonOutlet.frame;
        viewAllButtonHideRect = viewAllCommentsButtonOutlet.frame;      

        topBarHideRect.origin.y = topBarHideRect.origin.y - 44.0;
        backButtonHideRect.origin.y = backButtonHideRect.origin.y - 44.0;
        topBarTitleLabelHideRect.origin.y = topBarTitleLabelHideRect.origin.y - 44.0;
        searchButtonHideRect.origin.y = searchButtonHideRect.origin.y + 74.0;
        bottomBarHideRect.origin.y = bottomBarHideRect.origin.y + 74.0;
        helpButtonHideRect.origin.y = helpButtonHideRect.origin.y - 44;
        gotoPageButtonHideRect.origin.y = gotoPageButtonHideRect.origin.y + 73.0;
        gotoSliderHideRect.origin.x = gotoSliderHideRect.origin.x - 70.0;
        commentsButtonHideRect.origin.y =  commentsButtonHideRect.origin.y + 74.0;
        viewAllButtonHideRect.origin.y = viewAllButtonHideRect.origin.y + 74.0;

    }
    else if(delegate.currentOrientation == UIInterfaceOrientationPortraitUpsideDown || delegate.currentOrientation == UIInterfaceOrientationPortrait)
    {
        currPage.frame = CGRectMake(   0.0,    0.0,   768.0, 1004.0);
        tiledLayerSize = tiledLayerSizePortrait;

        searchMenus.frame = CGRectMake(568, 890, 400, 55);      

        // Customising go to page slider
        CGAffineTransform trans = CGAffineTransformMakeRotation (M_PI * 0.5);
        goToPageSlider.transform = trans;
        goToPageSlider.minimumValue = 1;
        goToPageSlider.maximumValue = totalNoOfScriptPages;
        goToPageSlider.frame = CGRectMake(15.0,90.0, 50.0, 825.0);

        CGRect frame20=backButtonOutlet.frame;
        frame20.origin.x=8;
        frame20.origin.y=4;
        frame20.size.width=69;
        frame20.size.height=35;
        backButtonOutlet.frame=frame20;

        CGRect frame4=pdfPageTopBar.frame;
        frame4.origin.x=0;
        frame4.origin.y=0;
        frame4.size.width=768;
        frame4.size.height=44;
        pdfPageTopBar.frame=frame4;

        CGRect frame5=pdfTitleOutlet.frame;
        frame5.origin.x=187;
        pdfTitleOutlet.frame=frame5;

        CGRect frame6=helpButtonOutlet.frame;
        frame6.origin.x=687;
        frame6.origin.y=3;
        frame6.size.width=76;
        frame6.size.height=36;
        helpButtonOutlet.frame=frame6;

        CGRect frame10=pdfPageBottomBar.frame;
        frame10.origin.x=-2;
        frame10.origin.y=931;
        frame10.size.width=770;
        frame10.size.height=74;
        pdfPageBottomBar.frame=frame10;

        CGRect frame11=searchButtonOutlet.frame;
        frame11.origin.x=195;
        frame11.origin.y=931;
        searchButtonOutlet.frame=frame11;

        CGRect frame12=gotoPageButtonOutlet.frame;
        frame12.origin.x=387;
        frame12.origin.y=931;
        frame12.size.width=192;
        frame12.size.height=74;
        gotoPageButtonOutlet.frame=frame12;

        CGRect frame13=backButtonOutlet.frame;
        frame13.origin.x=9;
        frame13.origin.y=4;
        frame13.size.width=69;
        frame13.size.height=35;
        backButtonOutlet.frame=frame13;

        CGRect frame17=commentsButtonOutlet.frame;
        frame17.origin.x=1;
        frame17.origin.y=931;
        commentsButtonOutlet.frame=frame17;

        CGRect frame18=viewAllCommentsButtonOutlet.frame;
        frame18.origin.x=580;
        frame18.origin.y=931;
        viewAllCommentsButtonOutlet.frame=frame18;  

        CGRect frame14=modeSwitchBtnImage.frame;
        frame14.origin.x=602;
        modeSwitchBtnImage.frame=frame14;

        CGRect frame16=modeSwitchBtnOutlet.frame;
        frame16.origin.x=602;
        modeSwitchBtnOutlet.frame=frame16;

        CGRect frameDoneBtn = commentDoneButtonOutlet.frame;
        frameDoneBtn.origin.x = 599;
        commentDoneButtonOutlet.frame = frameDoneBtn;

        //to remove thr popover for goto page
        if([objGoToPagePopOverController isPopoverVisible])
        {
            [objGoToPagePopOverController dismissPopoverAnimated:YES];
        }

        //for comments
        if(commentsView.hidden == NO && isKeyBoardShown == YES)
        {
            commentsView.frame = CGRectMake(0,535,768,205);
            CGRect pageTextCommentsFrame = pageTextComments.frame;
            pageTextCommentsFrame.size.height = 135;
            pageTextCommentsFrame.size.width = 728;
            pageTextComments.frame = pageTextCommentsFrame;

        }
        else if(commentsView.hidden == NO && isKeyBoardShown == NO)
        {
            commentsView.frame = CGRectMake(0, 568, 768, 362);

            CGRect pageTextCommentsFrame = pageTextComments.frame;
            pageTextCommentsFrame.size.height = 290;
            pageTextCommentsFrame.size.width = 725;
            pageTextComments.frame = pageTextCommentsFrame;

        }


        // Initialising top & bottm bar elements show rect
        topBarShowRect = pdfPageTopBar.frame;
        bottomBarShowRect = pdfPageBottomBar.frame;
        backButtonShowRect = backButtonOutlet.frame;
        topBarTitleLabelShowRect = pdfTitleOutlet.frame;
        searchButtonShowRect = searchButtonOutlet.frame;
        helpButtonShowRect = helpButtonOutlet.frame;
        gotoPageButtonShowRect = gotoPageButtonOutlet.frame;
        gotoSliderShowRect = goToPageSlider.frame;
        commentsButtonShowRect = commentsButtonOutlet.frame;
        viewAllButtonShowRect = viewAllCommentsButtonOutlet.frame;


        // Initialising top & bottom bar elements hide rect
        topBarHideRect = pdfPageTopBar.frame;
        backButtonHideRect = backButtonOutlet.frame;
        topBarTitleLabelHideRect = pdfTitleOutlet.frame;
        searchButtonHideRect = searchButtonOutlet.frame;
        bottomBarHideRect = pdfPageBottomBar.frame;
        helpButtonHideRect = helpButtonOutlet.frame;
        gotoPageButtonHideRect = gotoPageButtonOutlet.frame;
        gotoSliderHideRect = goToPageSlider.frame;
        commentsButtonHideRect = commentsButtonOutlet.frame;
        viewAllButtonHideRect = viewAllCommentsButtonOutlet.frame;      

        topBarHideRect.origin.y = topBarHideRect.origin.y - 44.0;
        backButtonHideRect.origin.y = backButtonHideRect.origin.y - 44.0;
        topBarTitleLabelHideRect.origin.y = topBarTitleLabelHideRect.origin.y - 44.0;
        searchButtonHideRect.origin.y = searchButtonHideRect.origin.y + 74.0;
        bottomBarHideRect.origin.y = bottomBarHideRect.origin.y + 74.0;
        helpButtonHideRect.origin.y = helpButtonHideRect.origin.y - 44;
        gotoPageButtonHideRect.origin.y = gotoPageButtonHideRect.origin.y + 74.0;
        gotoSliderHideRect.origin.x = gotoSliderHideRect.origin.x - 70.0;
        commentsButtonHideRect.origin.y =  commentsButtonHideRect.origin.y + 74.0;
        viewAllButtonHideRect.origin.y = viewAllButtonHideRect.origin.y + 74.0;

    }

}

withih willRotateToInterfaceOrientation i am calling my mythod where i am setting the landscape and portrait rects for all my UI elements

-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
    delegate.currentOrientation = toInterfaceOrientation;
    [self landscapePortraitOrientation];
}



- (void) landscapePortraitOrientation
{
    CGRect scriptPageViewRect = delegate.objNewWindow.frame;
    scriptPageViewRect.origin.x = 0.0;
    scriptPageViewRect.origin.y = 0.0;

    if((delegate.currentOrientation == UIInterfaceOrientationLandscapeLeft )|| (delegate.currentOrientation == UIInterfaceOrientationLandscapeRight))
    {

        searchMenus.frame = CGRectMake(824, 634, 400, 55);      
        currPage.frame = CGRectMake( 0.0, 0.0, 1004.0, 768.0);          //( 0.0, 0.0, 798.0, 1024.0);  //( 138.0, -140.0, 768.0, 1004.0)
        tiledLayerSize = tiledLayerSizeLandscape;

        // Customising go to page slider
        CGAffineTransform trans = CGAffineTransformMakeRotation (M_PI * 0.5);
        goToPageSlider.transform = trans;
        goToPageSlider.minimumValue = 1;
        goToPageSlider.maximumValue = totalNoOfScriptPages;
        goToPageSlider.frame = CGRectMake(15.0,90.0, 50.0, 550.0);


        CGRect frame4=backButtonOutlet.frame;
        frame4.origin.x=8;
        frame4.origin.y=4;
        frame4.size.width=69;
        frame4.size.height=35;
        backButtonOutlet.frame=frame4;  

        CGRect frame5=pdfPageTopBar.frame;
        frame5.origin.x = 0;
        frame5.origin.y = 0;
        frame5.size.width = 1024;
        frame5.size.height = 44;
        pdfPageTopBar.frame = frame5;       


        CGRect frame6=pdfTitleOutlet.frame;
        frame6.origin.x=319;
        pdfTitleOutlet.frame=frame6;        

        CGRect frame7=helpButtonOutlet.frame;
        frame7.origin.x=928;
        frame7.origin.y=3;
        frame7.size.width = 76;
        frame7.size.height = 36;
        helpButtonOutlet.frame=frame7;

        CGRect frame9=modeSwitchBtnImage.frame;
        frame9.origin.x=818;
        modeSwitchBtnImage.frame=frame9;


        CGRect frame10=pdfPageBottomBar.frame;
        frame10.origin.x = -3;
        frame10.origin.y = 675;
        frame10.size.width = 1028;
        frame10.size.height = 74;
        pdfPageBottomBar.frame=frame10;


        CGRect frame13=gotoPageButtonOutlet.frame;
        frame13.origin.x = 504;
        frame13.origin.y = 675;
        gotoPageButtonOutlet.frame = frame13;

        CGRect frame17=searchButtonOutlet.frame;
        frame17.origin.x=314;
        frame17.origin.y=675;
        searchButtonOutlet.frame=frame17;

        CGRect frame18=viewAllCommentsButtonOutlet.frame;
        frame18.origin.x=696;
        frame18.origin.y=675;
        viewAllCommentsButtonOutlet.frame=frame18;

        CGRect frame19=commentsButtonOutlet.frame;
        frame19.origin.x=125;
        frame19.origin.y=675;       
        commentsButtonOutlet.frame=frame19;     


        CGRect frame14=modeSwitchBtnOutlet.frame;
        frame14.origin.x=818;
        modeSwitchBtnOutlet.frame=frame14;

        CGRect frameDoneBtn = commentDoneButtonOutlet.frame;
        frameDoneBtn.origin.x = 835;
        commentDoneButtonOutlet.frame = frameDoneBtn;

        if([objGoToPagePopOverController isPopoverVisible])
        {
            [objGoToPagePopOverController dismissPopoverAnimated:YES];
        }

        //for comments
        if(commentsView.hidden == NO && isKeyBoardShown == YES)
        {CGRect commentsViewFrame = CGRectMake(0,200,1024,205);
            commentsView.frame = commentsViewFrame;
            CGRect pageTextCommentsFrame = pageTextComments.frame;
            pageTextCommentsFrame.origin.x = 20;
            pageTextCommentsFrame.size.width = 986;
            pageTextCommentsFrame.size.height = 120;
            pageTextComments.frame = pageTextCommentsFrame;
        }
        else if(commentsView.hidden == NO && isKeyBoardShown == NO)
        {

            CGRect commentsViewFrame = CGRectMake(0,380,1024,300);
            commentsView.frame = commentsViewFrame;

            CGRect pageTextCommentsFrame = pageTextComments.frame;
            pageTextCommentsFrame.origin.x = 20;
            pageTextCommentsFrame.size.width = 980;
            pageTextCommentsFrame.size.height = 220;
            pageTextComments.frame = pageTextCommentsFrame;

        }

        // Initialising top & bottm bar elements show rect
        topBarShowRect = pdfPageTopBar.frame;
        bottomBarShowRect = pdfPageBottomBar.frame;
        backButtonShowRect = backButtonOutlet.frame;
        topBarTitleLabelShowRect = pdfTitleOutlet.frame;
        searchButtonShowRect = searchButtonOutlet.frame;
        helpButtonShowRect = helpButtonOutlet.frame;
        gotoPageButtonShowRect = gotoPageButtonOutlet.frame;
        gotoSliderShowRect = goToPageSlider.frame;
        commentsButtonShowRect = commentsButtonOutlet.frame;
        viewAllButtonShowRect = viewAllCommentsButtonOutlet.frame;


        // Initialising top & bottom bar elements hide rect
        topBarHideRect = pdfPageTopBar.frame;
        backButtonHideRect = backButtonOutlet.frame;
        topBarTitleLabelHideRect = pdfTitleOutlet.frame;
        searchButtonHideRect = searchButtonOutlet.frame;
        bottomBarHideRect = pdfPageBottomBar.frame;
        helpButtonHideRect = helpButtonOutlet.frame;
        gotoPageButtonHideRect = gotoPageButtonOutlet.frame;
        gotoSliderHideRect = goToPageSlider.frame;
        commentsButtonHideRect = commentsButtonOutlet.frame;
        viewAllButtonHideRect = viewAllCommentsButtonOutlet.frame;      

        topBarHideRect.origin.y = topBarHideRect.origin.y - 44.0;
        backButtonHideRect.origin.y = backButtonHideRect.origin.y - 44.0;
        topBarTitleLabelHideRect.origin.y = topBarTitleLabelHideRect.origin.y - 44.0;
        searchButtonHideRect.origin.y = searchButtonHideRect.origin.y + 74.0;
        bottomBarHideRect.origin.y = bottomBarHideRect.origin.y + 74.0;
        helpButtonHideRect.origin.y = helpButtonHideRect.origin.y - 44;
        gotoPageButtonHideRect.origin.y = gotoPageButtonHideRect.origin.y + 73.0;
        gotoSliderHideRect.origin.x = gotoSliderHideRect.origin.x - 70.0;
        commentsButtonHideRect.origin.y =  commentsButtonHideRect.origin.y + 74.0;
        viewAllButtonHideRect.origin.y = viewAllButtonHideRect.origin.y + 74.0;

    }
    else if(delegate.currentOrientation == UIInterfaceOrientationPortraitUpsideDown || delegate.currentOrientation == UIInterfaceOrientationPortrait)
    {
        currPage.frame = CGRectMake(   0.0,    0.0,   768.0, 1004.0);
        tiledLayerSize = tiledLayerSizePortrait;

        searchMenus.frame = CGRectMake(568, 890, 400, 55);      

        // Customising go to page slider
        CGAffineTransform trans = CGAffineTransformMakeRotation (M_PI * 0.5);
        goToPageSlider.transform = trans;
        goToPageSlider.minimumValue = 1;
        goToPageSlider.maximumValue = totalNoOfScriptPages;
        goToPageSlider.frame = CGRectMake(15.0,90.0, 50.0, 825.0);

        CGRect frame20=backButtonOutlet.frame;
        frame20.origin.x=8;
        frame20.origin.y=4;
        frame20.size.width=69;
        frame20.size.height=35;
        backButtonOutlet.frame=frame20;

        CGRect frame4=pdfPageTopBar.frame;
        frame4.origin.x=0;
        frame4.origin.y=0;
        frame4.size.width=768;
        frame4.size.height=44;
        pdfPageTopBar.frame=frame4;

        CGRect frame5=pdfTitleOutlet.frame;
        frame5.origin.x=187;
        pdfTitleOutlet.frame=frame5;

        CGRect frame6=helpButtonOutlet.frame;
        frame6.origin.x=687;
        frame6.origin.y=3;
        frame6.size.width=76;
        frame6.size.height=36;
        helpButtonOutlet.frame=frame6;

        CGRect frame10=pdfPageBottomBar.frame;
        frame10.origin.x=-2;
        frame10.origin.y=931;
        frame10.size.width=770;
        frame10.size.height=74;
        pdfPageBottomBar.frame=frame10;

        CGRect frame11=searchButtonOutlet.frame;
        frame11.origin.x=195;
        frame11.origin.y=931;
        searchButtonOutlet.frame=frame11;

        CGRect frame12=gotoPageButtonOutlet.frame;
        frame12.origin.x=387;
        frame12.origin.y=931;
        frame12.size.width=192;
        frame12.size.height=74;
        gotoPageButtonOutlet.frame=frame12;

        CGRect frame13=backButtonOutlet.frame;
        frame13.origin.x=9;
        frame13.origin.y=4;
        frame13.size.width=69;
        frame13.size.height=35;
        backButtonOutlet.frame=frame13;

        CGRect frame17=commentsButtonOutlet.frame;
        frame17.origin.x=1;
        frame17.origin.y=931;
        commentsButtonOutlet.frame=frame17;

        CGRect frame18=viewAllCommentsButtonOutlet.frame;
        frame18.origin.x=580;
        frame18.origin.y=931;
        viewAllCommentsButtonOutlet.frame=frame18;  

        CGRect frame14=modeSwitchBtnImage.frame;
        frame14.origin.x=602;
        modeSwitchBtnImage.frame=frame14;

        CGRect frame16=modeSwitchBtnOutlet.frame;
        frame16.origin.x=602;
        modeSwitchBtnOutlet.frame=frame16;

        CGRect frameDoneBtn = commentDoneButtonOutlet.frame;
        frameDoneBtn.origin.x = 599;
        commentDoneButtonOutlet.frame = frameDoneBtn;

        //to remove thr popover for goto page
        if([objGoToPagePopOverController isPopoverVisible])
        {
            [objGoToPagePopOverController dismissPopoverAnimated:YES];
        }

        //for comments
        if(commentsView.hidden == NO && isKeyBoardShown == YES)
        {
            commentsView.frame = CGRectMake(0,535,768,205);
            CGRect pageTextCommentsFrame = pageTextComments.frame;
            pageTextCommentsFrame.size.height = 135;
            pageTextCommentsFrame.size.width = 728;
            pageTextComments.frame = pageTextCommentsFrame;

        }
        else if(commentsView.hidden == NO && isKeyBoardShown == NO)
        {
            commentsView.frame = CGRectMake(0, 568, 768, 362);

            CGRect pageTextCommentsFrame = pageTextComments.frame;
            pageTextCommentsFrame.size.height = 290;
            pageTextCommentsFrame.size.width = 725;
            pageTextComments.frame = pageTextCommentsFrame;

        }


        // Initialising top & bottm bar elements show rect
        topBarShowRect = pdfPageTopBar.frame;
        bottomBarShowRect = pdfPageBottomBar.frame;
        backButtonShowRect = backButtonOutlet.frame;
        topBarTitleLabelShowRect = pdfTitleOutlet.frame;
        searchButtonShowRect = searchButtonOutlet.frame;
        helpButtonShowRect = helpButtonOutlet.frame;
        gotoPageButtonShowRect = gotoPageButtonOutlet.frame;
        gotoSliderShowRect = goToPageSlider.frame;
        commentsButtonShowRect = commentsButtonOutlet.frame;
        viewAllButtonShowRect = viewAllCommentsButtonOutlet.frame;


        // Initialising top & bottom bar elements hide rect
        topBarHideRect = pdfPageTopBar.frame;
        backButtonHideRect = backButtonOutlet.frame;
        topBarTitleLabelHideRect = pdfTitleOutlet.frame;
        searchButtonHideRect = searchButtonOutlet.frame;
        bottomBarHideRect = pdfPageBottomBar.frame;
        helpButtonHideRect = helpButtonOutlet.frame;
        gotoPageButtonHideRect = gotoPageButtonOutlet.frame;
        gotoSliderHideRect = goToPageSlider.frame;
        commentsButtonHideRect = commentsButtonOutlet.frame;
        viewAllButtonHideRect = viewAllCommentsButtonOutlet.frame;      

        topBarHideRect.origin.y = topBarHideRect.origin.y - 44.0;
        backButtonHideRect.origin.y = backButtonHideRect.origin.y - 44.0;
        topBarTitleLabelHideRect.origin.y = topBarTitleLabelHideRect.origin.y - 44.0;
        searchButtonHideRect.origin.y = searchButtonHideRect.origin.y + 74.0;
        bottomBarHideRect.origin.y = bottomBarHideRect.origin.y + 74.0;
        helpButtonHideRect.origin.y = helpButtonHideRect.origin.y - 44;
        gotoPageButtonHideRect.origin.y = gotoPageButtonHideRect.origin.y + 74.0;
        gotoSliderHideRect.origin.x = gotoSliderHideRect.origin.x - 70.0;
        commentsButtonHideRect.origin.y =  commentsButtonHideRect.origin.y + 74.0;
        viewAllButtonHideRect.origin.y = viewAllButtonHideRect.origin.y + 74.0;

    }

}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文