Чтобы отключить ориентации для конкретного контроллера вида , теперь вы должны переопределить supportedInterfaceOrientations
и preferredInterfaceOrientationForPresentation
.
- (NSUInteger) supportedInterfaceOrientations {
// Return a bitmask of supported orientations. If you need more,
// use bitwise or (see the commented return).
return UIInterfaceOrientationMaskPortrait;
// return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
}
- (UIInterfaceOrientation) preferredInterfaceOrientationForPresentation {
// Return the orientation you'd prefer - this is what it launches to. The
// user can still rotate. You don't have to implement this method, in which
// case it launches in the current orientation
return UIInterfaceOrientationPortrait;
}
Если вы ориентируетесь на что-то старше iOS 6, вам нужен метод shouldAutorotateToInterfaceOrientation:
. Изменив значение «Да», вы определите, будет ли он вращаться в указанной ориентации. Это позволит только нормальную портретную ориентацию.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
// Use this to allow upside down as well
//return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
}
Обратите внимание, что shouldAutorotateToInterfaceOrientation:
устарела в iOS 6.0 .
Можете ли вы импортировать свой сертификат в хранилище доверенных издателей на машине сборки? (Internet Explorer> Инструменты> Параметры> Содержимое> Сертификаты)
Я не использую MSBuild для создания развертываний; Я использую Mage. Однако я использую наш файл .pfx для импорта нашего сертификата в мой магазин Trusted Publisher. Для этого мне нужно ввести пароль. После этого, когда я сохраняю манифест в Mage, мне больше не нужно вводить пароль. Я могу просто выбрать сертификат в моем магазине.
John Robbins has a blog post about how to wrap SignTool.exe in MSBuild, Code Signing – It’s Cheaper and Easier than You Thought.