我刚刚安装了xcode 11 gm种子,并在其上运行我的项目,我意识到没有一种旋转方法可以在xcode 10及更高版本中完美调用。我不知道这是xcode的错误还是我错过了一些东西。这是我正在使用的设备旋转方法
- (BOOL) shouldAutorotate
{
if([videoOptions[@"doc_type"] integerValue] == 3){
return NO;
}
return YES;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
if([videoOptions[@"doc_type"] integerValue] == 3){
return UIInterfaceOrientationPortrait;
}
return UIInterfaceOrientationPortrait|UIInterfaceOrientationLandscapeLeft|UIInterfaceOrientationLandscapeRight;
// return UIInterfaceOrientationPortrait;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
if([videoOptions[@"doc_type"] integerValue] == 3){
return UIInterfaceOrientationMaskPortrait;
}
return UIInterfaceOrientationMaskAllButUpsideDown;
// return UIInterfaceOrientationMaskPortrait;
}
// Notifies when rotation begins, reaches halfway point and ends.
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
// NSLog(@"%ld, duration: %f", (long)toInterfaceOrientation, duration);
// [self.movieSlider hidePopover];
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[self viewRotationCompleted];
}
答案 0 :(得分:0)
两种方法
$('input[name=radio]').change(function() {
if (this.value=== 'DOB' || this.value=== 'DOJ') {
$('input[name=input]').prop('type', 'date');
} else {
$('input[name=input]').prop('type', 'text');
}
});
从iOS8开始,不再使用。您需要使用其替换方法,
import requests
import time
from bs4 import BeautifulSoup as soup
url = "http://www.drjastrow.de/WAI/Vokabular/Muskeln-A1.html"
links = []
time.sleep(1)
print(url)
page = requests.get(url)
text = soup(page.text, 'html.parser')
table = text.select('table')[1]
rows = table.find_all('tr')[2:]
names = []
for row in rows:
names.append(row.find_all('td')[1].text.replace('\n', ''))
print(names)
但是不会为UPSideDown旋转调用此方法。因此,您需要照顾好这一点。