Heading UITableView issue in ios8 - objective-c

I am using splitviewcontroller into my app.depends on selection in master view.......deatil view will appear........we are having multiple detail view.
This my code to call the detail view
- (void)setDetailItem:(id)newDetailItem
{
[self.navigationController setDelegate:self];
if (_detailItem != newDetailItem) {
_detailItem = newDetailItem;
// Update the view.
}
if([[self.detailItem description] isEqualToString:#"Companies"])
{
listViewController_ = [self.storyboard instantiateViewControllerWithIdentifier:#"ListStoryBoard"];
[self addChildViewController:listViewController_];
if (![[PSAWebServices sharedInstance] isPushInProcess]) {
[self.navigationController pushViewController:listViewController_ animated:YES];
}
}
else if ([[self.detailItem description] isEqualToString:#"Contacts"])
{
contactlistViewController_ = [self.storyboard instantiateViewControllerWithIdentifier:#"contactListView"];
[self addChildViewController:contactlistViewController_];
if (![[PSAWebServices sharedInstance] isPushInProcess])
{
[self.navigationController pushViewController:contactlistViewController_ animated:YES];
}
}
else if ([[self.detailItem description] isEqualToString:#"Projects"])
{
projectViewController_ = [self.storyboard instantiateViewControllerWithIdentifier:#"projectListView"];
[self addChildViewController:projectViewController_];
if (![[PSAWebServices sharedInstance] isPushInProcess])
{
[self.navigationController pushViewController:projectViewController_ animated:YES];
}
}
else if ([[self.detailItem description] isEqualToString:#"Activities"])
{
activitiesViewController_ = [self.storyboard instantiateViewControllerWithIdentifier:#"activityListView"];
[self addChildViewController:activitiesViewController_];
if (![[PSAWebServices sharedInstance] isPushInProcess])
{
[self.navigationController pushViewController:activitiesViewController_ animated:YES];
}
}
else if ([[self.detailItem description] isEqualToString:#"Calendar"])
{
calendarViewController_ = [self.storyboard instantiateViewControllerWithIdentifier:#"CalendarStoryBoard"];
//[self.navigationController setNavigationBarHidden:YES];
[self addChildViewController:calendarViewController_];
//[self.view addSubview:self.calendarViewController.view];
//[self.navigationController pushViewController:calendarViewController_ animated:YES];
if (![[PSAWebServices sharedInstance] isPushInProcess])
{
[self.navigationController pushViewController:calendarViewController_ animated:YES];
}
}
}
here is problem which come only first time
My question is I am not able to set the frame of the detail view in ios8 with using the Auto layout and constraints
can u plz help me out this?
Thanks in advance
but i when rotated device it get fit correctly in screen
where i am getting wrong

Related

In objective-c, by using self in a view controller, does this create a strong reference cycle?

I've noticed while working with Objective-C, the compiler throws error symbols enforcing the use of either self or an underscore when using a property which I think doesn't happen as harshly when using Swift. I'm now at the crossroads where I believe my view controller isn't being deallocated from the navigation stack. I've used self pretty heavily in order to silence the error symbols but I don't know if this has created retain cycles or not?
#import "MenuController.h"
#import "AppDelegate.h"
#import "CMUser.h"
#import "NotificationsSettingsController.h"
#import "PersonalInfoController.h"
#import "BeLive-Swift.h"
#import "LoginAndSecurityController.h"
#import "SplashController.h"
#define kCellSeparatorTag 100
#implementation SideMenuCell
- (void)layoutSubviews{
[super layoutSubviews];
}
#end
#interface MenuController ()<UITableViewDataSource ,UITableViewDelegate>
#property (nonatomic, strong) NSArray *menuTitles;
#property (nonatomic, weak) IBOutlet UITableView *tableView;
#property (weak, nonatomic) IBOutlet UILabel *usersNameLabel;
#property (weak, nonatomic) IBOutlet UILabel *usersEmailLabel;
#property (weak, nonatomic) IBOutlet UILabel *addPhotoLabel;
#property (weak, nonatomic) IBOutlet SettingsHeaderViewWithPhoto *settingsHeaderViewWithPhoto;
#end
#implementation MenuController
NSString *userFirstNameString;
NSString *userLastNameString;
NSString *userEmailString;
NSMutableString * usersFullNameString;
+ (instancetype)controller{
static MenuController *sharedInstance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = ControllerFromMainStoryBoard([self description]);
});
return sharedInstance;
}
- (void) viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.settingsHeaderViewWithPhoto.backButton addTarget:self action:#selector(popViewCon:) forControlEvents:UIControlEventTouchUpInside];
[self.settingsHeaderViewWithPhoto.rightButton addTarget:self action:#selector(logoutTapped:) forControlEvents:UIControlEventTouchUpInside];
}
-(void)showUserInfoInHeaderView{
if (userEmailString.length != 0) {
self.settingsHeaderViewWithPhoto.emailSubLabel.text = userEmailString;
} else {
self.settingsHeaderViewWithPhoto.emailSubLabel.text = #"Email not available";
}
if (usersFullNameString.length != 0) {
self.settingsHeaderViewWithPhoto.nameLabel.text = usersFullNameString;
} else {
self.settingsHeaderViewWithPhoto.nameLabel.text = #"Full name not available";
}
[self setMenuArrayBasedOnUserType];
[self.tableView reloadData];
}
-(void)setMenuArrayBasedOnUserType{
if (CMUser.currentUser.type == UserTypeArtist) {
self.menuTitles = #[#[#"Notifications", #"Stripe Info", #"Personal Info", #"Login and Security", #"Invite a Friend", #"Help", #"Legal Agreement"]];
[self.tableView reloadData];
} else if (CMUser.currentUser.type == UserTypeViewer){
self.menuTitles = #[#[#"Notifications", #"Personal Info", #"Login and Security", #"Invite a Friend", #"Help", #"Legal Agreement"]];
[self.tableView reloadData];
} else {
[self showLoggedInAlert];
};
}
-(void)showLoggedInAlert{
UIAlertController *alert = [UIAlertController alertControllerWithTitle:#"Session Time Out"
message:#"You must be logged in first."
preferredStyle:UIAlertControllerStyleAlert]; // 1
UIAlertAction *firstAction = [UIAlertAction actionWithTitle:#"OK"
style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
NSLog(#"You pressed ok");
UIStoryboard *sb = [UIStoryboard storyboardWithName:#"Main" bundle:nil];
SplashController *vc = [sb instantiateViewControllerWithIdentifier:#"SplashController"];
[self presentViewController:vc animated:YES completion:nil];
}];
[alert addAction:firstAction];
[self presentViewController:alert animated:YES completion:nil];
}
-(void)getLoggedInUserInfo{
[NetworkManager callEndPoint:USER_DETAILS withDict:nil method:#"GET" JSON:YES success:^(id responseObject) {
userFirstNameString = responseObject[#"data"][0][#"firstname"];
userLastNameString = responseObject[#"data"][0][#"lastname"];
userEmailString = responseObject[#"data"][0][#"emailAddress"];
usersFullNameString = [NSMutableString stringWithString:userFirstNameString];
[usersFullNameString appendString:#" "];
[usersFullNameString appendString: userLastNameString];
[self showUserInfoInHeaderView];
} failure:^(id responseObject, NSError *error) {
NSLog(#"callEndPoint error is: %#", error);
}];
}
-(void)showProfilPhoto{
if ([CMUser currentUser][#"imageUrl"] != NULL) {
self.settingsHeaderViewWithPhoto.addPhotoLabel.text = #"";
[self.settingsHeaderViewWithPhoto.userPhotoButton sd_setImageWithURL:[NSURL URLWithString:[CMUser currentUser][#"imageUrl"]]forState:UIControlStateNormal];
} else {
self.settingsHeaderViewWithPhoto.addPhotoLabel.text = #"Add Photo";
}
}
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationBarHidden = YES;
[self.tableView registerClass:[SettingsTableViewCell class] forCellReuseIdentifier:#"MenuCell"];
self.tableView.backgroundColor = [UIColor colorWithHex:0x222222];
[self getLoggedInUserInfo];
[self showProfilPhoto];
}
- (void)viewWillLayoutSubviews{
[super viewWillLayoutSubviews];
CGFloat revealWidth = ApplicationDelegate.drawerController.maximumLeftDrawerWidth;
CGRect frame = self.view.frame;
frame.size.width = revealWidth;
self.view.frame = frame;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return self.menuTitles.count;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
NSMutableArray *menuItems = self.menuTitles[section];
return menuItems.count;
}
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
NSArray *menuItems = self.menuTitles[indexPath.section];
SettingsTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:#"MenuCell"
forIndexPath:indexPath];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.textLabel.text = menuItems[indexPath.row];
UIView *separatorView = [cell.contentView viewWithTag:kCellSeparatorTag];
if (!separatorView) {
CGFloat revealWidth = ApplicationDelegate.drawerController.maximumLeftDrawerWidth;
separatorView = [[UIView alloc] initWithFrame:CGRectMake(10, 43, revealWidth - 20, 1)];
separatorView.backgroundColor = [UIColor darkGrayColor];
[cell.contentView addSubview:separatorView];
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath
animated:YES];
if (indexPath.section == 0) {
switch (indexPath.row) {
case 0:
[self notificationsTapped];
default:
break;
}
switch (indexPath.row) {
case 1:
//TODO: IF userrole == artist then show stripe info else if userrole == , show person information
if (CMUser.currentUser.type == UserTypeArtist) {
NSLog(#"Show strip credit info");
} else if (CMUser.currentUser.type == UserTypeViewer) {
NSLog(#"Show personal info");
[self personalInfoTapped];
}
break;
default:
break;
}
switch (indexPath.row) {
case 2:
if (CMUser.currentUser.type == UserTypeArtist) {
NSLog(#"Show strip personal info");
[self personalInfoTapped];
} else if (CMUser.currentUser.type == UserTypeViewer) {
NSLog(#"Show login and security");
[self loginSecurityTapped];
}
break;
default:
break;
}
switch (indexPath.row) {
case 3:
if (CMUser.currentUser.type == UserTypeArtist) {
NSLog(#"Show login and security");
[self loginSecurityTapped];
} else if (CMUser.currentUser.type == UserTypeViewer) {
NSLog(#"Show Invite a friend");
[self inviteFriendTapped];
}
break;
default:
break;
}
switch (indexPath.row) {
case 4:
if (CMUser.currentUser.type == UserTypeArtist) {
NSLog(#"Show Invite a friend");
[self inviteFriendTapped];
} else if (CMUser.currentUser.type == UserTypeViewer) {
NSLog(#"Show Help");
//goto: webURL www.belive.com/help
[self helpTapped];
}
break;
default:
break;
}
switch (indexPath.row) {
case 5:
if (CMUser.currentUser.type == UserTypeArtist) {
NSLog(#"Show help");
//goto: webURL www.belive.com/help
[self helpTapped];
} else if (CMUser.currentUser.type == UserTypeViewer) {
NSLog(#"Show legal agreement");
//goto: webURL www.belive.com/legal
[self legalAgreementTapped];
}
break;
default:
break;
}
switch (indexPath.row) {
case 6:
if (CMUser.currentUser.type == UserTypeArtist) {
NSLog(#"Show legal agreement");
//goto: webURL www.belive.com/legal
[self legalAgreementTapped];
} else if (CMUser.currentUser.type == UserTypeViewer) {
NSLog(#"do nothing because there is not a value for this case.");
}
break;
default:
break;
}
}
}
- (void)notificationsTapped{
NotificationsSettingsController *vc = [NotificationsSettingsController controller];
[self.navigationController pushViewController:vc
animated:YES];
}
- (void)popViewCon: (UIButton*)sender{
[ApplicationDelegate toggleMenu];
}
- (void)logoutTapped: (UIButton*)sender{
[ApplicationDelegate toggleMenu];
[CMUser logOut];
[ApplicationDelegate setController];
}
-(void)personalInfoTapped{
UIStoryboard *sb = [UIStoryboard storyboardWithName:#"Settings" bundle:nil];
PersonalInfoController *vc = [sb instantiateViewControllerWithIdentifier:#"PersonalInfoController"];
vc.usersProfilePhoto = self.settingsHeaderViewWithPhoto.userPhotoButton.imageView.image;
[self.navigationController pushViewController:vc animated:YES];
}
-(void)loginSecurityTapped{
UIStoryboard *sb = [UIStoryboard storyboardWithName:#"Settings" bundle:nil];
LoginAndSecurityController *vc = [sb instantiateViewControllerWithIdentifier:#"LoginAndSecurityController"];
//LoginAndSecurityController *vc = [LoginAndSecurityController controller];
[self.navigationController pushViewController:vc animated:YES];
}
-(void)inviteFriendTapped{
UIStoryboard *sb = [UIStoryboard storyboardWithName:#"Settings" bundle:nil];
InviteFriendController
*vc = [sb instantiateViewControllerWithIdentifier:#"InviteFriendController"];
[self.navigationController pushViewController:vc animated:YES];
}
-(void)helpTapped{
UIStoryboard *sb = [UIStoryboard storyboardWithName:#"Settings" bundle:nil];
HelpController *vc = [sb instantiateViewControllerWithIdentifier:#"helpController"];
[self.navigationController pushViewController:vc animated:YES];
}
-(void)legalAgreementTapped{
UIStoryboard *sb = [UIStoryboard storyboardWithName:#"Settings" bundle:nil];
LegalAgreementController *vc = [sb instantiateViewControllerWithIdentifier:#"legalController"];
[self.navigationController pushViewController:vc animated:YES];
}
- (IBAction)addPhotoButtonTapped:(UIButton *)sender {
[self configureAddPhotoActionSheet];
}
-(void)configureAddPhotoActionSheet{
UIAlertController *actionSheet = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
[actionSheet addAction:[UIAlertAction actionWithTitle:#"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
// Cancel button tappped do nothing.
}]];
[actionSheet addAction:[UIAlertAction actionWithTitle:#"Take a Photo" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
// take photo button tapped.
[self takePhoto];
}]];
[actionSheet addAction:[UIAlertAction actionWithTitle:#"Choose Photo from Library" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
// choose photo button tapped.
[self selectPhoto];
}]];
[self presentViewController:actionSheet animated:YES completion:nil];
}
- (void)takePhoto{
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:picker animated:YES completion:NULL];
}
- (void)selectPhoto{
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:picker animated:YES completion:NULL];
}
//UIImagePickerDelegate Methods
/*
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info{
UIImage *chosenImage = info[UIImagePickerControllerEditedImage];
[self.profilePictureButton setImage:chosenImage forState:UIControlStateNormal];
self.addPhotoLabel.text = #"";
[self updateProfilePicture:chosenImage];
[picker dismissViewControllerAnimated:YES completion:NULL];
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
[picker dismissViewControllerAnimated:YES completion:NULL];
} */
- (void)updateProfilePicture:(UIImage*)image{
NSData *imageData = UIImageJPEGRepresentation(image, 0.5);
NSString *imageString = [NSString stringWithFormat:#"data:image/png;base64,%#", [imageData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]];
NSDictionary *params = #{#"ImageFileContent" : imageString,
#"ImageName" : #"image.jpg"
};
NSString *uploadEndPoint = #"artist/add-artist-photo";
MBProgressHUD *HUD = [MBProgressHUD showHUDAddedTo:self.settingsHeaderViewWithPhoto.userPhotoButton animated:YES];
[NetworkManager callEndPoint:uploadEndPoint
withDict:params
method:#"POST"
JSON:YES
success:^(id responseObject) {
NSLog(#"The response object has: %#", responseObject);
[CMUser currentUser][#"imageUrl"] = responseObject[#"data"][0][#"imageURL"];
[[CMUser currentUser] setCurrent];
[HUD hideAnimated:YES];
} failure:^(id responseObject, NSError *error) {
[HUD hideAnimated:YES];
}];
}
#end
This is used to synthesise the variable. It is necessary in objective c and swift works differently then swift. And it doesn't creat any retail cycle.
After doing some reading, I've come to the realization that retain cycles can be created by delegates, using self within a closure, and if other objects are referencing your view controller in question. The problem I had was that this particular view controller is actually the root view controller of a navigation stack in which other view controllers were referencing it as well. Also I made a call to self within two block statements in the code above which also has the potential for creating a strong reference to itself.

can't dismiss game center leaderboard

I have a app, and i'm using GameCenter leaderboard.
but i can't dismiss the leaderboard:
this is my code :
-(void)showLeaderboard {
GKGameCenterViewController *leaderboardController = [[GKGameCenterViewController alloc] init];
if (leaderboardController != NULL)
{
leaderboardController.leaderboardIdentifier = #"Leaderboard";
leaderboardController.viewState = GKGameCenterViewControllerStateLeaderboards;
leaderboardController.gameCenterDelegate = self;
UIViewController *vc = self.view.window.rootViewController;
[vc presentViewController: leaderboardController animated: YES completion:nil];
}
}
- (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)viewController
{
NSLog(#"Close");
UIViewController *vc = self.view.window.rootViewController;
[vc dismissViewControllerAnimated:YES completion:nil];
}
I have no idea what to do, :-
Try dismissing your viewController in the code
Change your code like this
-(void)showLeaderBoard
{
if (leaderboardController != NULL)
{
leaderboardController.leaderboardIdentifier = #"Leaderboard";
leaderboardController.viewState = GKGameCenterViewControllerStateLeaderboards;
leaderboardController.gameCenterDelegate = self;
[self presentViewController: leaderboardController animated: YES completion:nil];
}
}
- (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)viewController
{
[viewController dismissViewControllerAnimated:YES completion:nil];
}

Can't add Twitter view to the scene

I am trying to add a Twitter view so I can see that it's being called, and also that the account is connected, but the Twitter sheet is not there ...
It's on a CCScene .(cocos2d)
if ([TWTweetComposeViewController canSendTweet])
{
//we can log here
TWTweetComposeViewController *tweetViewController = [[TWTweetComposeViewController alloc] init];
[tweetViewController setInitialText:#"message"];
tweetViewController.completionHandler = ^(TWTweetComposeViewControllerResult result)
{
if(result == TWTweetComposeViewControllerResultDone)
{
} else if(result == TWTweetComposeViewControllerResultCancelled)
{
}
[viewController dismissViewControllerAnimated:YES completion:nil];
};
// present view controller
[[[CCDirector sharedDirector] view] addSubview:viewController.view];
[viewController presentViewController:tweetViewController animated:YES completion:nil];
}
else
{
NSLog(#"NO TWITTER ");
}
[[CCDirector sharedDirector]presentModalViewController:tweetViewController animated:YES];
instead of the 2 lines that present the modal view .

iOS: UIImagePickerController and ResignFirstResponder

I have an application that allows the user to select a photo from their camera roll, and display it in a UIImageView. But, after they tap on which image they would like to display, the camera roll's view does not disappear. So, I figured that I would need to simply call [sender resignFirstResponder];. But, this did not do the trick. I've been trying multiple things and doing searching around, but to no avail. I'm very new to Objective-C, so any help is much appreciated. Here is the code I'm working with:
(imgPicker is the UIImagePickerController.)
- (IBAction)grabImage(id)sender {
self.imgPicker = [[UIImagePickerController alloc] init];
self.imgPicker.delegate = self;
self.imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
_popover = [[UIPopoverController alloc] initWithContentViewController:imgPicker];
[_popover presentPopoverFromRect:self.imageView.bounds inView:self.imageView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
else {
[self presentModalViewController:imgPicker animated:YES];
}
[self.imgPicker resignFirstResponder];
}
And this may or may not be relevant to the issue:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editInfo {
if (imageView.image == nil) {
imageView.image = img;
[[picker parentViewController] dismissModalViewControllerAnimated:YES];
return;
}
if (imageView2.image == nil) {
imageView2.image = img;
[[picker parentViewController] dismissModalViewControllerAnimated:YES];
return;
}
}
You need just this line to dismiss modal picker in your delegate method:
[picker dismissModalViewControllerAnimated:YES];
resignFirstResponder in this case is useless
Try
[self dismissModalViewControllerAnimated:YES];
As you want to dismiss only picker view and not parent view of picker
you just have to use:
[picker dismissModalViewControllerAnimated:YES];
and you are done.

Check if controller has already been loaded XCode

I have the following code to push a new ViewController in a Split View Controller:
Level4ViewController *controller = [[Level4ViewController alloc] initWithNibName:#"ModuleViewController" bundle:nil];
[[detailViewController navigationController] pushViewController:controller animated:YES];
[controller release], controller = nil;
The only problem I have, if I were to run this again, a new controller will show, I would like to be able to go to the view that I had before with all my data.
Can anyone help me out here.
Thanks.
EDIT:
Updated code?
Level4ViewController *controller;
for(UIView *view in self.navigationController.viewControllers)
{
if([view isKindOfClass:[Level4ViewController class]])
{
controller = view;
if(controller == nil)
{
controller = [[Level4ViewController alloc] initWithNibName:#"ModuleViewController" bundle:nil];
}
else {
controller = [self.navigationController.viewControllers objectAtIndex:1];
}
}
}
[[detailViewController navigationController] pushViewController:controller animated:YES];
[controller release], controller = nil;
UINavigationController has a property viewControllers which is a NSArray that hold all the stack that has been pushed to the navigation controller, in this array you can check for your view controller if it is there use that one - you check like this -
Level4ViewController *lvc;
for(UIView *view in self.navigationController.viewControllers)
{
if([view isKindOfClass:[Level4ViewController class]])
{
lvc = view;
}
}
and if you already knows that at which index your viewcontroller is there then you can get it from that index as -
Level4ViewController *lvc = [self.navigationController.viewControllers objectAtIndex:1];
update -
Level4ViewController *controller;
for(UIView *view in self.navigationController.viewControllers)
{
if([view isKindOfClass:[Level4ViewController class]])
{
controller = view;
}
}
if(controller == nil)
{
controller = [[Level4ViewController alloc] initWithNibName:#"ModuleViewController" bundle:nil];
}
[[detailViewController navigationController] pushViewController:controller animated:YES];
[controller release], controller = nil;
If you are using a navigation controller
FirstScreenViewController *firstScreenVC = [self.storyboard instantiateViewControllerWithIdentifier:#"1S"];
if (![self.navigationController.topViewController isKindOfClass:FirstScreenViewController.class])
[self.navigationController pushViewController:firstScreenVC animated:YES];