ios7

How can I keep UIActionSheet from being dismissed when background touched?

孤人 提交于 2019-12-11 06:00:03
问题 The default behavior for the UIActionSheet used to be that touching the background did not dismiss it, and in fact did nothing. But with iOS 7 touching the background is equivalent to pressing the cancelButton . I'm modifying some software that needs to be kept to the iOS 6 behavior. How can I keep touches of the background from dismissing the action sheet? 回答1: You can achieve this by not using a cancel button. Check this SO post: UIActionSheet in iOS7 dismissing when user taps ANYWHERE on

Adds Bar showing up form Bottom in ios 7

会有一股神秘感。 提交于 2019-12-11 05:59:05
问题 I am showing adds at the bottom of my app, but in iOS 7, adds are showing up from the bottom, but in iOS 6 adds are showing at the bottom. -(void)showAdds { [bannerView removeFromSuperview]; if ((UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)) { // bannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner]; bannerView = [[GADBannerView alloc] initWithFrame:CGRectMake(128.0, 670 , GAD_SIZE_728x90.width, GAD_SIZE_728x90.height)]; bannerView.adUnitID = @"********"; } else { //

Translucent , setStatusBarStyle, UIWebView

送分小仙女□ 提交于 2019-12-11 05:37:10
问题 I'm working on the UIWebView and what I want is for the webView not to over rap the view. so here is the question. I set the UIWebView ,and the status bar is overlaid over the content. How can I handle this? I coded as when I made the UIImage view, but at that time there is the navigation bar, and it worked well. Also I did setFrame:CGRectMake(0, 20).... but also doesn't work. why the [ setFrame]; method doesn't work? Any ideas please. #import "ViewController.h" @interface ViewController ()

Dimming a tintColor on a UITableViewCell

坚强是说给别人听的谎言 提交于 2019-12-11 05:27:49
问题 Here is a UITableViewCell that opens a modal ('Add Ingredients'): I am setting the label color to match the application's tintColor: cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; cell.textLabel.text = @"Add Ingredients..."; cell.textLabel.textColor = [self.view tintColor]; How do I dim the text color when a UIAlertView or UIActionSheet is presented? This behavior is default for buttons and other controls, but not for a cell's text label. I

How to detect and display available wifi networks near by my current location?

你离开我真会死。 提交于 2019-12-11 04:58:50
问题 I want to detect all the available wifi networks near by my current location and i have to list them in a tableview. I don't have any idea about this functionality. Anyone suggest me with right solution. Thanks in Advance 回答1: You can't by using public library. You sure can using private ones, but you don't want apple to reject your app. if u using any private api try this 来源: https://stackoverflow.com/questions/26436923/how-to-detect-and-display-available-wifi-networks-near-by-my-current

redraw view off screen - contains picker view and tool bar

自作多情 提交于 2019-12-11 04:52:46
问题 Im trying to draw/place a view (which contains a picker view and a toolbar offscreen). On launch the View is still on the screen despite changing its coordinates in viewDidLoad. self.pickerViewContainer.frame = CGRectMake(0, 722, 320, 207); Im using the storyboard. I have created the view in the storyboard, visible in the view controller. I thought i could redraw it off screen as per coordinates above. 回答1: When you use Auto layout write your view's frame related code in viewDidLayoutSubviews

Tableview button get index.row

我是研究僧i 提交于 2019-12-11 04:39:20
问题 I got a button in a tableview cell (named "deleteTemplate"), and when it's pressed i should get the "index.row" for the cell the button is in. Anybody knows how to get the "index.row" for the cell, when you click a button in the cell? My current code for the button: UITableViewCell *clickedCell = (UITableViewCell *)[[sender superview] superview]; NSIndexPath *clickedButtonIndexPath = [self.tableView indexPathForCell:clickedCell]; NSDictionary *dic = [tableData objectAtIndex

UITableView cell background difference in iOS7.0

风流意气都作罢 提交于 2019-12-11 04:33:27
问题 So I have made this app with a hell of a lot UITableViews that started around iOS 4.3. In the past week I've updated my iPhone to iOS7.0 and when i ran my app (that is currently in development again) and my UITableView backgrounds turned out white instead of the clearcolor that used to work before. So I've searched google and came to the conclusion that we should now do this color at cellular level. Like in this question: UITableView clear background I've tried that and it works fine. However

NSLineBreakByWordWrapping not working ios7

杀马特。学长 韩版系。学妹 提交于 2019-12-11 04:16:37
问题 I have a UILabel which is populated from the database .. the text in the UILabel can be long and can be short .. the problem is that the text is being cut at the end .. for example its shown like this: "www.sample.com/h1/h2/h3..." where it should be: "www.sample.com/h1/h2/h3/h4/h5/h6.html" This is the code I am using: CGFloat constraintWidth = 180.0f; CGSize labelsize = [details.web sizeWithFont:self.webTextLabel.font constrainedToSize:CGSizeMake(constraintWidth, CGFLOAT_MAX) lineBreakMode