Kilka minut temu wystartowała firma Apple iOS beta 6 4 pentru dezvoltatorii de aplicatii pentru iOS. Noul iOS 6 beta 4 are build-ul 10A5376, insa pentru unii apare ca fiind versiunea beta 3, iar pentru altii apare eroarea de mai jos cand incearca sa dea restore. Deocamdata se pare ca exista unele probleme cu sistemul celor de la Apple, insa era de asteptat avand in vedere ca vorbim despre o versiune beta. Noua versiune beta a iOS 6 este disponibila si in portalul dedicat dezvoltatorilor pe website-ul Apple, deci daca nu puteti sa o descarcati din terminal o puteti descarca de acolo.
Ramy kont
-
When requesting access to Facebook accounts, the only key required in your options dictionary is
ACFacebookAppIdKey
.ACFacebookPermissionGroupKey
iACFacebookAppVersionKey
są już nieaktualne.If you request a write permission underACFacebookPermissionsKey
, Takie jakpublish_stream
, you must provide a value forACFacebookAudienceKey
, który może być jednym zACFacebookAudienceEveryone
,ACFacebookAudienceFriends
lubACFacebookAudienceOnlyMe
.
Książka adresowa
-
NAPRAWIONY: Gdy aplikacja znajduje się w nowym stanie prywatności i próbuje przedstawić plik
ABNewPersonViewController
, the user cannot dismiss that view controller properly, even if the user allows access to contacts. The user must force quit the app and relaunch. -
Prośba o dostęp do kontaktów:
- Users are able to grant or deny access to contact data on a per-app basis. To request access to contact data, call the
ABAddressBookRequestAccessWithCompletion
function after calling theABAddressBookCreateWithOptions
funkcjonować. TheABAddressBookRequestAccessWithCompletion
function does not block the app while the user is being asked to grant or deny access. Until access has been granted, theABAddressBookRef
object will not contain any contacts, and any attempt to modify contacts fails with akABOperationNotPermittedByUserError
error. The user is prompted only the first time access is requested; any subsequent calls toABAddressBookCreateWithOptions
will use the existing permissions. The completion handler is called on an arbitrary queue. If theABAddressBookRef
object is used throughout the app, then all usage must be dispatched to the same queue to useABAddressBookRef
in a thread-safe manner.
- Users are able to grant or deny access to contact data on a per-app basis. To request access to contact data, call the
-
Sprawdzanie statusu uprawnień dostępu:
- An app can use the authorization status API to check if it can access contacts, calendars, reminders, or the photo library. This API is independent from the request access API and will not prompt the user to grant or deny access. With this API an app can adjust the display of its UI elements that would access the data class. For example, if access to contacts is authorized or not determined, then a UI button to pick a contact can be displayed.
- For Address Book, call the
ABAddressBookGetAuthorizationStatus
function. For Event Kit, call theauthorizationStatusForEntityType:
class method ofEKEventStore
. For Assets Library, call theauthorizationStatus
class method ofALAssetsLibrary
. Znaczenie zwracanych wartości statusu jest następujące:- Status autoryzacji Nieokreślony—The user has not yet made a choice regarding whether this app can access the data class.
- Stan autoryzacji Ograniczony—This app is not authorized to access the data class. The user cannot change this app’s status, possibly due to active restrictions such as parental controls being in place.
- Stan autoryzacji odrzucony—The user explicitly denied access to the data class for this app.
- Status autoryzacji Autoryzowany—This app is authorized to access the data class.
apple TV
-
NAPRAWIONY: W niektórych przypadkach ekran może wyświetlać niewłaściwą rozdzielczość. Uruchom ponownie Apple TV, aby przywrócić prawidłową rozdzielczość.
-
NAPRAWIONY: Apple TV może zostać ponownie uruchomiony podczas korzystania z aplikacji Remote.
-
NAPRAWIONY: Apple TV może zostać ponownie uruchomiony w przypadku zmiany języka systemu.
-
NAPRAWIONY: Strumień zdjęć nie ładuje się przy drugim logowaniu. Uruchom ponownie Apple TV, aby rozwiązać problem.
-
Podczas pokazu slajdów nie jest odtwarzana muzyka.
-
Screen saver may revert to using the default images after installing update.
Halo
-
Połączenia
NSNetService
interfejsy API class i CFNetService nie obejmują domyślnie interfejsów P2P. Aby przeglądać, rejestrować lub rozpoznawać usługi za pośrednictwem interfejsów P2P, aplikacja musi korzystać z protokołu BonjourDNSService*()
Interfejsy API wymienione poniżej. -
Setting the interfaceIndex parameter to
kDNSServiceInterfaceIndexAny
in the following APIs will not include P2P interfaces by default. To include P2P interfaces, you must now set thekDNSServiceFlagsIncludeP2P
flaga podczas używaniakDNSServiceInterfaceIndexAny
lub ustawinterfaceIndex
dokDNSServiceInterfaceIndexP2P
. Interfejsy API, których to dotyczy, mają:DNSServiceBrowse
DNSServiceRegister
DNSServiceResolve
DNSServiceRegisterRecord
DNSServiceQueryRecord
Słownik
-
NAPRAWIONY: There is a known issue with dictionaries when attempting to define a word in any language other than English or Japanese. When the reference library is presented, the user is given the option to download a dictionary—that download may not begin. The user can tap outside the popover on an iPad or tap the Done button on the iPhone or iPod touch to dismiss the download request.
Zestaw wydarzeń
-
Prośba o dostęp do kalendarzy lub przypomnień:
- Users are able to grant or deny access to event and reminder data on a per-app basis. To request access to event and/or reminder data, call the
requestAccessToEntityType:completion:
: method ofEKEventStore
. This will not block the app while the user is being asked to grant or deny access. Until access has been granted for an entity type, the event store will not contain any calendars for that entity type and any attempt to save data will fail. - The user will be prompted only the first time access is requested; any subsequent instantiations of
EKEventStore
will use the existing permissions. The completion handler is called on an arbitrary queue.
- Users are able to grant or deny access to event and reminder data on a per-app basis. To request access to event and/or reminder data, call the
Game Center
-
NAPRAWIONY: When creating a new Game Center account in-app on the iPad, the popover for selecting the month of your date of birth shows up with no content to select.
-
Połączenia
authenticate
metodaGKLocalPlayer
has been removed. Authentication will commence automatically when the completion handler is set. -
As of iOS 6 beta 4,
GKGameCenterViewController
singleton is no longer supported. -
As of iOS 6 beta 4,
GKScore+Sharing.h file
and associate category are removed.
iCloud
-
When creating an iCloud account, you can use any email-based Apple ID or your existing iCloud account. If you had a MobileMe account that you did not move to iCloud, you can use that Apple ID to sign up for a new iCloud account (none of your previous MobileMe data will be present).Provisioning profiles must be enabled for iCloud in the iOS Provisioning Portal. To enable a provisioning profile for iCloud, navigate to the App ID section of the iOS Provisioning Portal and configure your App ID for iCloud. After enabling the App ID for iCloud, regenerate your provisioning profiles to enable them for iCloud.
icloud.com
email addresses are now available for iCloud mail users. Users signing up for new Apple IDs, or enabling Mail on their iCloud account for the first time, will automatically receive an@icloud.com
email address instead of ame.com
email address. iCloud users with@me.com
addresses that have been used with iOS 6 beta 3 or later will receive an@icloud.com
email address that matches their@me.com
adres.icloud.com
email cannot be sent from www.icloud.com. Użytkownicy powinni używać http://beta.icloud.com at this time if they wish to use a web browser to send email from theiricloud.com
adres.@icloud.com
addresses will be added within two weeks of first using iOS 6.
-
Połączenia
setSortDescriptors:
metodaNSMetadataQuery
nie jest wspierany. -
W systemie iOS 6 plików chronionych za pomocą funkcji Data Protection nie można używać za pomocą interfejsów API iCloud Storage.
-
Filenames are case-insensitive in OS X but case-sensitive in iOS. This can lead to problems when using iCloud to share files between the two platforms. On iOS, you should take steps to avoid creating files with names that differ only by case.
-
The behavior of coordinated read operations on iCloud Documents has changed:On previous iOS releases, when your app performed a coordinated read operation on a file or package and the iCloud daemon noticed that there was a newer version of the item available, the coordinated read operation blocked until the newer version of the item was downloaded and written to the disk.
As of iOS 6 beta 3, when you start a coordinated read operation on a file or package for which you already have a local version, the coordinated read will be granted as soon as possible, and the new version, if any, will download in the background. This call will block for downloading reasons only if you do not have any version of the file available locally.
Ponadto, gdy plik jest w konflikcie, demon iCloud nie będzie czekać, aż wszystkie pliki, które utraciły konflikt, będą dostępne, aby udostępnić plik Twojej aplikacji. Udostępni różne wersje pliku będącego w konflikcie tak szybko, jak to możliwe. Twoja aplikacja może korzystać z istniejącej koordynacji plików i
UIDocument
wywołania zwrotne, które mają być powiadamiane, gdy przegrane konflikty zostaną pobrane i będą dostępne.
iTunes
-
Do zestawu iOS SDK 10.6.3 wymagana jest aplikacja iTunes 6.0.
-
Previous public betas of iOS can no longer download iTunes Match songs.
Lokalizacja
-
In iOS 6 beta 4, modifications were introduced to the new enum
CLActivityType
in Core Location:- zastąpić
CLActivityTypeVehicularNavigation
wCLActivityTypeAutomotiveNavigation
. - Dodaj
CLActivityTypeOtherNavigation
for other vehicular navigation—e.g., boats, trains, or planes.
- zastąpić
Mapy
-
In iOS 6 and later, Map Kit is built on a new infrastructure hosted by Apple. Earlier iOS releases will continue to use Google’s service.Routing apps that do not specify a coverage file during development will always be displayed in the Maps routing search results.
- Zgodność API zostanie zachowana (zobacz znane problemy poniżej).
- Maps are now supported in Simulator.
- Map data will continue to evolve—only a limited amount of high-resolution satellite imagery is currently available.
-
Testing and debugging of coverage files for routing apps is only supported during development through the Xcode Run workflow. (You can specify the coverage file for a given Run scheme using the Options pane of the Run section of the scheme editor.) Apps that are archived and distributed (outside of the App Store) onto devices will not have access to the app’s coverage files.
-
NAPRAWIONY: Maps does not zoom into the current location when launched from a third-party app.
Kiosk
-
NAPRAWIONY: Only simple HTTP downloads will work with Newsstand.
Książeczka bankowa
-
The Description field is now a required field for a Pass. All passes created without it will fail to validate and will not ingest.
-
Passbook in Simulator no longer requires
https
/ssl
podczas korzystania zwebServiceURL
when ingesting a pass. -
NAPRAWIONY: Nie można wyświetlić kart pokładowych na ekranie blokady.
-
Passes will no longer fall back to
background.png
ifstrip.png
is not included in your pass bundle. -
Zawartość
userInfo
słownik dlaPKPassLibraryDidChangeNotification
have changed in the case of removed passes. Please consult the latest documentation for the newuserInfo
słownik.
Bezpieczeństwo
-
W systemie iOS 5 podpisywanie certyfikatów podpisem MD5 nie jest obsługiwane. Upewnij się, że certyfikaty korzystają z algorytmów podpisu opartych na SHA1 lub SHA2.
-
In iOS 6, there are improved privacy controls for Calendar, Reminders, Contacts, and Photos.
- Użytkownicy zobaczą okna dialogowe dostępu, gdy aplikacja spróbuje uzyskać dostęp do dowolnego z tych typów danych. Użytkownik może włączać i wyłączać dostęp w Ustawieniach > Prywatność.
- Developers can set a “purpose” string for each class of isolated data. iOS displays this string to users to help them understand why their data is being requested. These strings can be added using Xcode’s Project editor, which is in the Info tab. The relevant key names begin with the string “Privacy -”.
- Wprowadzono zmiany w frameworkach Event Kit i Address Book, aby pomóc programistom w korzystaniu z tej funkcji.
Symulator
-
NAPRAWIONY: Pojawienie się panelu powiadomień z potwierdzeniem usunięcia aplikacji w symulatorze iOS może zająć trochę czasu.
-
No privacy alerts are displayed in iOS Simulator for apps that access Photos, Contacts, Calendar, and Reminders.
-
Downloading In-App Purchase hosted content in iOS Simulator is not supported.
-
When attempting to play an MP3 sound in Simulator, you will hear a popping sound instead.
Udostępniony strumień zdjęć
-
Users must go to Settings > iCloud to ensure that they receive Shared Photo Stream Notifications.
-
In order to share a Photo Stream with iOS 6 beta, you must invite someone using his iCloud email address; otherwise, he will not receive the invitation.
-
Upgrading from iOS 6 beta 1 to beta 2 will cause your device to redownload all of your Shared Photo Streams.
-
Funkcja udostępnianego strumienia zdjęć jest wyłączona podczas aktualizacji systemu iOS 6 beta 1 do nowszej wersji. Domyślne ustawienie powinno być włączone.
-
NAPRAWIONY: Turning off Shared Photo Streams may leave Camera in an unresponsive state; force quitting the Camera app will resolve this issue.
Obserwuj Nas
-
Weibo pojawia się w aplikacji Ustawienia tylko wtedy, gdy włączona jest chińska klawiatura.
-
Połączenia
requestAccessToAccountsWithType:withCompletionHandler:
metodaACAccountStore
jest teraz przestarzały. Aby uzyskać dostęp do kont użytkowników, skorzystaj zrequestAccessToAccountsWithType:options:completion:
Metoda.In the options parameter of this new method, passnil
aby uzyskać dostęp do kont na Twitterze i Weibo. Aby uzyskać dostęp do kont na Facebooku, podaj słownik z następującymi kluczami (które są udokumentowane wACAccountStore.h
):When requesting access to Facebook accounts, the only key required in your options dictionary is
ACFacebookAppIdKey
.ACFacebookPermissionGroupKey
iACFacebookAppVersionKey
są już nieaktualne.If you request a write permission underACFacebookPermissionsKey
-Jak na przykładpublish_stream
—you must provide a value forACFacebookAudienceKey
, który może być jednym zACFacebookAudienceEveryone
,ACFacebookAudienceFriends
lubACFacebookAudienceOnlyMe
.Nie powinieneś już dodawać tego słownika do swojej aplikacji
Info.plist
plik, tak jak było to wymagane w wersji beta 1.
Pasek stanu
-
It is now possible to set status bar tint parameters in your app’s
Info.plist
file. You might do this to ensure that the status bar color matches your app’s navigation bar color during startup. To set the status bar tint, add theUIStatusBarTintParameters
key to yourInfo.plist
file. The value of this key is a dictionary with the appropriate values describing the navigation bar your app has at startup. Inside the dictionary should be theUINavigationBar
key, which has a value that is also a dictionary. That dictionary contains the initial navigation bar’s style (with theStyle
key) and whether it is translucent (with theTranslucent
key). If your navigation bar uses them, you can also specify its tint color (with theTintColor
key) or the name of its custom background image (with theBackgroundImage
klawisz).
UIKit
-
W iOS 5.1
UISplitViewController
class adopts the sliding presentation style when presenting the left view (previously seen only in Mail). This style is used when presentation is initiated either by the existing bar button item provided by the delegate methods or by a swipe gesture within the right view. No additional API adoption is required to obtain this behavior, and all existing APIs—including that of theUIPopoverController
instance provided by the delegate—will continue to work as before. If the gesture would be insupportable in your app, setting thepresentsWithGesture
właściwość kontrolera widoku podzielonego naNO
wyłącza ten gest. Jednak odradza się wyłączanie tego gestu, ponieważ jego użycie zapewnia spójne doświadczenie użytkownika we wszystkich aplikacjach. -
NAPRAWIONY: In iOS 6, changes have been introduced so that you no longer need to set a delegate and implement a method for Single-Finger and Single-Tap gesture recognizers. This makes them work well with the
UIControl
obiekty. -
W systemie iOS 6 i nowszych wersjach plik
UIWebView
class maluje swoją zawartość asynchronicznie. -
Autorotacja zmienia się w iOS 6. W iOS 6
shouldAutorotateToInterfaceOrientation:
metodaUIViewController
jest przestarzałe. Zamiast tego powinieneś użyćsupportedInterfaceOrientationsForWindow:
ishouldAutorotate
Metody.- Większa odpowiedzialność przechodzi na aplikację i delegata aplikacji. Teraz kontenery iOS (takie jak
UINavigationController
) nie konsultuj się ze swoimi dziećmi, aby ustalić, czy powinny wykonać autorotację. Domyślnie orientacje interfejsu obsługiwane przez aplikację i kontroler widoku są ustawione naUIInterfaceOrientationMaskAll
dla idiomu iPada iUIInterfaceOrientationMaskAllButUpsideDown
dla idiomu iPhone'a. - A view controller’s supported interface orientations can change over time—even an app’s supported interface orientations can change over time. The system asks the top-most full-screen view controller (typically the root view controller) for its supported interface orientations whenever the device rotates or whenever a view controller is presented with the full-screen modal presentation style. Moreover, the supported orientations are retrieved only if this view controller returns
YES
z jegoshouldAutorotate
metoda. System przecina obsługiwane orientacje kontrolera widoku z obsługiwanymi orientacjami aplikacji (określonymi przezInfo.plist
plik lub aplikację delegataapplication:supportedInterfaceOrientationsForWindow:
metoda), aby określić, czy obrócić. - The system determines whether an orientation is supported by intersecting the value returned by the app’s
supportedInterfaceOrientationsForWindow:
metodę z wartością zwróconą przezsupportedInterfaceOrientations
method of the top-most full-screen controller. - Połączenia
setStatusBarOrientation:animated:
method is not deprecated outright. However, it now works only if thesupportedInterfaceOrientations
method of the top-most full-screen view controller returns0
. To sprawia, że odpowiedzialność za zapewnienie spójnej orientacji paska stanu spoczywa na osobie dzwoniącej. - Aby zapewnić zgodność, przejrzyj kontrolery, które nadal implementują
shouldAutorotateToInterfaceOrientation:
metoda nie powoduje uzyskania nowych zachowań związanych z autorotacją. (Innymi słowy, nie wracają do korzystania z aplikacji, delegowania aplikacji aniInfo.plist
plik, aby określić obsługiwane orientacje.) Zamiast tego plikshouldAutorotateToInterfaceOrientation:
method is used to synthesize the information that would be returned by thesupportedInterfaceOrientations
Metoda.
- Większa odpowiedzialność przechodzi na aplikację i delegata aplikacji. Teraz kontenery iOS (takie jak
-
Połączenia
willRotateToInterfaceOrientation:duration:
,willAnimateRotationToInterfaceOrientation:duration:
,didRotateFromInterfaceOrientation:
methods are no longer called on any view controller that makes a full-screen presentation over itself—for example, by callingpresentViewController:animated:completion:
.W systemie iOS 6 plikviewWillUnload
iviewDidUnload
metodyUIViewController
jest teraz przestarzały. Jeśli korzystałeś z tych metod w celu zwolnienia danych, użyj metodydidReceiveMemoryWarning
zamiast tego metoda. Możesz także użyć tej metody, aby zwolnić odniesienia do widoku kontrolera widoku, jeśli nie jest on używany. Zanim to zrobisz, musisz sprawdzić, czy widok nie znajduje się w oknie.- Powinieneś upewnić się, że Twoje aplikacje nie używają tych metod do zarządzania układem jakichkolwiek widoków podrzędnych. Zamiast tego powinni używać kontrolera widoku
viewWillLayoutSubviews
metodę i dostosuj układ za pomocą prostokąta granic widoku.
- Powinieneś upewnić się, że Twoje aplikacje nie używają tych metod do zarządzania układem jakichkolwiek widoków podrzędnych. Zamiast tego powinni używać kontrolera widoku
-
It is unsupported to set values for the
shadowOffset
orshadowColor
właściwości aUILabel
object if itsattributedText
property contains a valid attributed string. Instead, use theNSShadowAttributeName
attribute of the attributed string to set the shadow. -
Ze względu na problemy związane ze zgodnością, plik
NSBaselineOffsetAttributeName
atrybut nie jest już obsługiwany w systemie iOS 6. -
Połączenia
NSTextAlignmentNatural
wartość jest nieobsługiwana i zgłosi wyjątek, gdy zostanie użyta ztextAlignment
własnośćUILabel
lub dostarczony jako parametr wyrównania dodrawInRect:withFont:lineBreakMode:alignment:
metodaNSString
. -
Połączenia
setContentStretch:
metodaUIView
zostało uznane za przestarzałe w tej wersji beta. Aby uzyskać ten sam efekt, użyj opcjiresizableImageWithCapInsets:
metodaUIImage
and display the image with aUIImageView
. -
Połączenia
resizableImageWithCapInsets:
metodaUIImage
effectively resizes images by tiling. As a performance optimization, it uses stretching rather than tiling when the user would not be able to tell the difference, such as when a single column or row is being stretched. But in certain circumstances, the user might want to actually stretch some region of an image. In iOS 6, theresizableImageWithCapInsets:resizingMode:
Metoda pozwala wywołującemu określić tryb zmiany rozmiaru sąsiadująco lub rozciągając. -
Połączenia
UICollectionViewLayout
class has changed:The bottom edge of aUILabel
view is now different from its baseline.Previously, auto layout was interpreting the bottom of aUILabel
to be the same as its baseline. While convenient in many cases, it caused problems if you wanted to place the top edge of one label against the bottom edge of another. In such a scenario, the bottom label would overlap the top one, and descenders from the top label could crash into ascenders from the bottom label. Now, auto layout interpretsUILayoutAttributeBottom
as the bottom of the text box (presuming the label is not bigger than its intrinsic content size) andUILayoutAttributeBaseline
as the baseline of the text. If you have already created code for laying out labels according to the bottom or center point, your text will move around a little and you will need to adjust your constraints.- The class now supports the customization of the animations created during rotation. The names of methods for customizing insert and delete animations have also changed, so the same hooks can be used for rotations as well as for insertions and deletions.
- Klasa zmieniła nazwy niektórych metod. W szczególności widoki dekoracji nie są już określane za pomocą „identyfikatora ponownego użycia”, ale raczej „rodzaju elementu”. Aplikacje korzystające z widoków dekoracyjnych będą musiały zmodyfikować swój kod i przebudować, aby to uwzględnić.
-
Aplikacje z widokami tabel w plikach końcówki lub scenorysu, które zostały utworzone przy użyciu poprzednich wersji beta systemu iOS 6, będą wymagały czystej kompilacji w wersji beta 3 i nowszych.
-
Oto kilka uwag dotyczących obsługi automatycznego układu dla
UIScrollView
:- In general, auto layout considers the top, left, bottom, and right edges of a view to be the widoczny edges. That is, if you pin a view to the left edge of its superview, you’re really pinning it to the minimum x-value of the superview’s bounds. Changing the bounds origin of the superview does nie change the position of the view.
- Połączenia
UIScrollView
class scrolls its content by changing the origin of its bounds. To make this work with auto layout, the meaning of the top, left, bottom, and right edgesw ciągu a scroll view now mean the edges of its content view. - Ograniczenia widoków podrzędnych widoku przewijania muszą skutkować rozmiarem do wypełnienia, który jest następnie interpretowany jako rozmiar zawartości widoku przewijania. (Nie należy tego mylić z
intrinsicContentSize
method used for auto layout.) To size the scroll view’sframe
with auto layout, constraints must either be explicit regarding the width and height of the scroll view, or the edges of the scroll view must be tied to views zewnętrzne of its subtree. - Pamiętaj, że możesz sprawić, że widok podrzędny widoku przewijania będzie sprawiał wrażenie unoszącego się (a nie przewijanego) nad inną przewijaną treścią, tworząc ograniczenia między widokiem a widokiem poza poddrzewem widoku przewijania, takim jak podgląd widoku przewijania.
- Oto kilka przykładów konfiguracji widoku przewijania:
- Podejście mieszane:
- Ustaw położenie i rozmiar widoku przewijania za pomocą ograniczeń zewnętrznych względem widoku przewijania — tj
translatesAutoresizingMaskIntoConstraints
właściwość jest ustawiona naNO
. - Utwórz równinę
UIView
widok zawartości dla widoku przewijania, który będzie miał rozmiar, jaki ma mieć Twoja treść. Ustaw go jako widok podrzędny widoku przewijania, ale pozwól mu nadal tłumaczyć maskę automatycznego zmieniania rozmiaru na ograniczenia:UIView *contentView = [[przydział UIView]
initWithFrame:CGRectMake(0,0,contentWidth,contentHeight)];
[scrollView addSubview:contentView];
// DON'T change contentView's translatesAutoresizingMaskIntoConstraints,
// domyślnie TAK;
- Ustaw rozmiar zawartości widoku przewijania, aby odpowiadał rozmiarowi widoku treści:
[scrollView setContentSize:CGMakeSize(contentWidth,contentHeight)];
- Utwórz widoki, które chcesz umieścić w widoku treści i skonfiguruj ich ograniczenia tak, aby umieścić je w widoku treści. Alternatywnie możesz utworzyć poddrzewo widoku, aby przejść do widoku przewijania, skonfigurować ograniczenia i wywołać funkcję
systemLayoutSizeFittingSize:
metoda (zUILayoutFittingCompressedSize
option) to find the size you want to use for your content view and thecontentSize
właściwość widoku przewijania.
- Ustaw położenie i rozmiar widoku przewijania za pomocą ograniczeń zewnętrznych względem widoku przewijania — tj
- Podejście oparte wyłącznie na automatycznym układzie:
- W tym przypadku,
translatesAutoresizingMaskIntoConstraints
musi być ustawiony naNO
on all views involved. - Ustaw położenie i rozmiar widoku przewijania za pomocą ograniczeń zewnętrznych względem widoku przewijania.
- Użyj ograniczeń, aby rozmieścić podwidoki w widoku przewijania, upewniając się, że ograniczenia są powiązane ze wszystkimi czterema krawędziami widoku przewijania i nie polegają na widoku przewijania w celu określenia ich rozmiaru.Prostym przykładem może być widok dużego obrazu, który ma wewnętrzny rozmiar zawartości wywodzący się z rozmiaru obrazu. w
viewDidLoad
metodę kontrolera widoku, należy dołączyć kod podobny do poniższego:UIScrollView *scrollView = [[UIScrollView alloc] init];
UIImageView *imageView = [[UIImageView alloc] init];
[imageView setImage:[UIImage imageNamed:"MyReallyBigImage"]];
[self.view addSubview:scrollView];
[scrollView addSubview:imageView];
scrollView.translatesAutoresizingMaskIntoConstraints = NO;
imageView.translatesAutoresizingMaskIntoConstraints = NO;
NSDictionary *viewsDictionary = NSDictionaryOfVariableBindings(scrollView,imageView);
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[scrollView]|" options:0 metrics: 0 viewsDictionary:viewsDictionary]];
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[scrollView]|" options:0 metrics: 0 viewsDictionary:viewsDictionary]];
[scrollView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[imageView]|" options:0 metrics: 0 viewsDictionary:viewsDictionary]];
[scrollView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[imageView]|" options:0 metrics: 0 viewsDictionary:viewsDictionary]];
Dałoby to widok przewijania, którego rozmiar zmieniałby się wraz ze zmianą rozmiaru widoku kontrolera widoku (na przykład przy obrocie urządzenia), a widok obrazu byłby przewijanym widokiem podrzędnym. Nie musisz ustawiać rozmiaru zawartości widoku przewijania.
- W tym przypadku,
- Podejście mieszane:
-
Given this view hierarchy:
ContainerView
| OddHeightView
| | EvenHeightView
| OtherFixedHeightView
and these constraints:
EvenHeightView.centerY == OddHeightView.centerY
EvenHeightView.bottom (or baseline) == OtherFixedHeightView.bottom (or baseline)
OtherFixedHeightView.top == ContainerView.top + <space>
in iOS 6 beta 4, on non-Retina display devices, the bottoms (or baselines) of the
EvenHeightView
orazOtherFixedHeightView
were off by one pixel and the developer could do nothing about it. This issue is now fixed.In iOS 6 beta 4, there is a known bug that when you have a constraint with one item that is a scroll view, the other item is a descendant of that scroll view, and you add the constraint to an ancestor of that scroll view, then the constraint might stop working properly. The workaround is to add such constraints only to the scroll view itself, not to any old ancestor.
- Before the changes, the layout engine did not integralize the position variables for the views, and these constraints were always satisfiable:
ContainerView
| OddWidthView
| EvenWidthView
OddWidthView.centerX == ContainerView.centerX
EvenWidthView.centerX == ContainerView.centerX
EvenWidthView.centerX == OddWidthView.centerX
Now, the layout engine is integralizing the position variables (x and y) as well as dimension variables (width and height). This means that it will try to satisfy the three constraints with an liczba całkowita solution, which might not be possible, and thus will log that these constraints are unsatisfiable. In this case, and in all analogous cases, developers just need to remove the redundant constraint (or constraints). In the example above, removing any one of the three constraints will resolve the issue.
- Before the changes, the layout engine did not integralize the position variables for the views, and these constraints were always satisfiable:
Safari i WebKit
-
WebKit na iOS obsługuje teraz
requestAnimationFrame
icancelAnimationFrame
methods in JavaScript, as described here: http://www.w3.org/TR/animation-timing/.The default app cache quota has increased from 5 MB to 25 MB.- Należy zauważyć, że ponieważ specyfikacja jest nadal w wersji roboczej, metody te mają
webkit
przedrostek, więc mająwindow.webkitRequestAnimationFrame
iwindow.webkitCancelAnimationFrame
.
- Należy zauważyć, że ponieważ specyfikacja jest nadal w wersji roboczej, metody te mają
-
The JPEG subsampling threshold has increased from 2 MP (megapixels) to 5 MP on all supported hardware except iPhone 3GS and iPod touch (4th generation).
-
Dodano wsparcie dla
<input type="file">
tags in web forms. Users can upload existing photos and videos from their photo library or take a picture or video using the camera. Previously, this form control was always disabled. -
W przeglądarce Safari 6.0 w systemie OS X programiści mogą teraz korzystać z narzędzia Web Inspector (narzędzia do tworzenia stron internetowych) na podłączonych urządzeniach iOS i symulatorze iOS. Programiści mogą używać Inspektora sieciowego do debugowania przeglądarki Safari i
UIWebView
class we własnych aplikacjach zbudowanych i uruchamianych z Xcode. Zastępuje to baner konsoli debugowania w przeglądarce Safari. -
W systemie iOS 6 i nowszych wersjach dane sieciowe (SQL Web Storage i LocalStorage) z pliku a
UIWebView
obiekt można zapisać w katalogu, którego kopia zapasowa zostanie utworzona. Aby włączyć tworzenie kopii zapasowych tych danych, ustaw opcjęWebKitStoreWebDataForBackup
klucz doYES
w ustawieniach domyślnych użytkownika aplikacji. Należy to zrobić tylko wtedy, gdy aplikacja korzysta z danych treści internetowych, których nie można ponownie załadować. Jeżeli twójUIWebView
obiekt otwiera linki do dowolnej treści internetowej, ten klucz powinien być ustawiony naNO
. Przełączenie wartości tego klucza nie spowoduje zachowania istniejących danych widoku internetowego. -
W systemie iOS 6 i nowszych wersjach Safari nie rejestruje się już w plikach Common
feed:
Schematy RSS/ATOM. Aplikacje, które mogą wyświetlać tego typu kanały, zachęcamy do zarejestrowania się w tym schemacie adresów URL. -
WebKit no longer always creates hardware-accelerated layers for elements with the
-webkit-transform: preserve-3d
opcjonalny. Autorzy powinni zaprzestać używania tej opcji jako sposobu na uzyskanie przyspieszenia sprzętowego. -
Experimental CSS3 Flexbox support will be disabled. Please switch from using
-webkit-flexbox
i-webkit-inline-flexbox
do-webkit-box
i-webkit-inline-box
. -
Począwszy od iOS 6, osadzone adresy URL YouTube w postaci
http://www.youtube.com/watch?v=oHg5SJYRHA0
nie będzie już działać. Te adresy URL służą do oglądania filmów w witrynie YouTube, a nie do umieszczania ich na stronach internetowych. Zamiast tego format, który powinien zostać użyty, opisano tutaj: https://developers.google.com/youtube/player_parameters. -
W iOS 6
keyboardDisplayRequiresUserAction
property was added to theUIWebView
class. The property defaults toYES
, which means that callingfocus()
on a form element will not bring up the keyboard. By changing the property toNO
, a JavaScript call tofocus()
on a form element will focus the element and bring up the keyboard automatically. -
As of iOS 6, calling
focus()
on a form element in a web app will focus the element.