- Posts: 64
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about iOS development and PDF
hegiht problem
IP: 192.168.0.70
12 years 8 months ago - 12 years 8 months ago #3365
by truculent
hegiht problem was created by truculent
dear radaee i want to hide my navigation bar but when i hide it with single tap method
it's work fine but problem is: [empty space ]
i want to my content of pdf fit my screen how i can do it ?
i want to change my pdf view frame
i goto PDFView & delete *m_scaleValue from
m_w = frame.size.width *m_scale ;
m_h = frame.size.height*m_scale;
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
m_doc = NULL;
m_view = nil;
m_scale = [[UIScreen mainScreen] scale];
m_w = frame.size.width;
m_h = frame.size.height;
self.userInteractionEnabled = YES;
self.multipleTouchEnabled = YES;
[self resignFirstResponder];
m_swipe_dx = 0;
m_swipe_dy = 0;
}
return self;
}
it work but when open pdf it;s not work but when go to add note controller & back agian it's work
then go to m_view = [[PDFView alloc] initWithFrame:CGRectMake(0, 0, rect.size.width, rect.size.height-20-hi)];
& delete -20-hi but it's not work for first [it need to rotate the screen]
it's work fine but problem is: [empty space ]
i want to my content of pdf fit my screen how i can do it ?
i want to change my pdf view frame
i goto PDFView & delete *m_scaleValue from
m_w = frame.size.width *m_scale ;
m_h = frame.size.height*m_scale;
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self)
{
m_doc = NULL;
m_view = nil;
m_scale = [[UIScreen mainScreen] scale];
m_w = frame.size.width;
m_h = frame.size.height;
self.userInteractionEnabled = YES;
self.multipleTouchEnabled = YES;
[self resignFirstResponder];
m_swipe_dx = 0;
m_swipe_dy = 0;
}
return self;
}
it work but when open pdf it;s not work but when go to add note controller & back agian it's work
then go to m_view = [[PDFView alloc] initWithFrame:CGRectMake(0, 0, rect.size.width, rect.size.height-20-hi)];
& delete -20-hi but it's not work for first [it need to rotate the screen]
Last edit: 12 years 8 months ago by patel_patel_patel.
IP: 192.168.0.70
12 years 8 months ago - 12 years 8 months ago #3375
by stronglee
Replied by stronglee on topic hegiht problem
Did you adjust the frame in singleTap action?
Last edit: 12 years 8 months ago by GoliNeneswees.
IP: 192.168.0.70
12 years 8 months ago #3379
by truculent
Replied by truculent on topic hegiht problem
no
i change the frame in
-(int)PDFOpen:(NSString *)path : (NSString *)pwd
{
///
m_view = [[PDFView alloc] initWithFrame:CGRectMake(0, 0, rect.size.width, rect.size.height)]; // delete your value !
it's work but need a rotate to apply
}
i change the frame in
-(int)PDFOpen:(NSString *)path : (NSString *)pwd
{
///
m_view = [[PDFView alloc] initWithFrame:CGRectMake(0, 0, rect.size.width, rect.size.height)]; // delete your value !
it's work but need a rotate to apply
}
IP: 192.168.0.70
12 years 8 months ago #3388
by stronglee
Replied by stronglee on topic hegiht problem
Is this view add to superview?
[self.view addSubview:m_view];
[self.view addSubview:m_view];
IP: 192.168.0.149
12 years 8 months ago #3391
by emanuele
Replied by emanuele on topic hegiht problem
you can try to move the entire view when you hide/show the navBar, something like:
CGRect tempFrame = self.view.frame;
tempFrame.origin.y -= self.navigationController.navigationBar.frame.size.height;
[self.view setFrame:tempFrame];
on single tap event
CGRect tempFrame = self.view.frame;
tempFrame.origin.y -= self.navigationController.navigationBar.frame.size.height;
[self.view setFrame:tempFrame];
on single tap event
Time to create page: 0.413 seconds