ios7

Retrieving device WiFi MAC address with iOS 7

自作多情 提交于 2019-12-31 03:19:12
问题 Our app is using device WiFiMAC address to uniquely identify a device. As per the Apple doumentation we shall start using identifierForVendor property of UIDevice but my app is strongly dependent on WiFi MAC address. At run time, app users look into device settings and fetch the WiFi Mac address and manually put them in some tool to enable some feature on server side. Has anyone retrieved the device WiFi MAC address with iOS 7? 回答1: This was intentionally removed from the SDK in iOS 7. You

iOS storyboard AutoLayout and adding constraint

℡╲_俬逩灬. 提交于 2019-12-31 02:12:30
问题 I am making changes to my app to support 3.5″ display. Currently it is supporting 4″ display. The screen layout looks like this. How to add following constraint in storyboard ? (I have enabled auto layout option in storyboard.) How to set button1 & button2 width to the half of super view's width ? and both should intersect at the middle of the superview's width. UIImage #1 should be placed at the middle of the superview's width. 回答1: 1 : Buttons Didn't figure to do everything in interface

Setting UIApplication statusBarHidden to YES does not work in iOS 7

折月煮酒 提交于 2019-12-31 02:01:10
问题 I've been using [UIApplication sharedApplication].statusBarHidden = YES; to hide the status bar when users enter specific UIViewControllers in iOS 6 and it worked great. In iOS 7 however it still shows a translucent overlay. 回答1: EDITED::: that is new updated answer : Do in plist file "View controller-based status bar appearance" to NO and write code [UIApplication sharedApplication].statusBarHidden = YES; in appdelegate 回答2: What worked for me was setting "Status bar is initially hidden" to

iOS7 App Submission - with only 2x (retina) images?

帅比萌擦擦* 提交于 2019-12-31 01:59:07
问题 I'm currently developing an application for iPhone with iOS7, only. From what I read, for iPhone with iOS7, there is no support for older devices than iPhone4. If that's the case, when it comes to images, all I need is retina images (@2x). Can I submit to the App Store, an app with only retina images, since the app's minimal requirement is retina devices ? Thank you. 回答1: Possible duplicate of Can I dump my non-Retina Images for a iOS7 only app? Anyway, as long as I know you don't need @2x

How to apply top offset for status bar in iOS7 for UITabBarController children only

早过忘川 提交于 2019-12-30 18:48:06
问题 My app is a UITabBarController based app with 3 children vc. The status bar is overlapping with my viewcontrollers. I have tried everything I have found in SO: I tried adding this to my AppDelegate: //Offset downwards to make room for status bar self.window.bounds = CGRectMake(0, -20, self.window.frame.size.width, self.window.frame.size.height); It worked because it moved the entire UITabBarController down by 20. But this resulted in the tabs being cut off at the bottom by -20. So Im thinking

EXC_BAD_INSTRUCTION happens when using dispatch_get_global_queue on ios 7(swift)

僤鯓⒐⒋嵵緔 提交于 2019-12-30 18:33:21
问题 let downloadGroup = dispatch_group_create() var images = [UIImage]() var errors = [NSError]() dispatch_apply(UInt(urls.count), dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)) { (i) in dispatch_group_enter(downloadGroup) SimpleCache.sharedInstance.getImage(urls[Int(i)], completion: { (image, error) -> () in if let fullImage = image { images.append(fullImage) } else { if let err = error { DLog(err.description) errors.append(err) } } dispatch_group_leave(downloadGroup); }) } dispatch

How to check the correct current time if user sets “Set Automatically” off

我们两清 提交于 2019-12-30 11:34:07
问题 I have to check the correct current time if user sets "Set Automatically" off. Is there any way to access the status of "Set Automatically" setting status so that I cam prompt user to turn it on. OR Another approach I can follow I can fetch the time from GPS(location) but the below code always gives the local time in case of user selects "Set Automatically" off. CLLocation* location = [[CLLocation alloc] initWithLatitude:(CLLocationDegrees) 0.0 longitude:(CLLocationDegrees) 0.0]; NSDate* now

Change width of a UIBarButtonItem in a UINavigationBar in swift

被刻印的时光 ゝ 提交于 2019-12-30 08:22:51
问题 i need to set frame for my navigation bar button in swift 2.0 i tried this code self.navigationController!.navigationBar.drawRect(CGRectMake(0, 0, 30, 30)) but it won't work thanks in advance 回答1: // Swift 3 let backButton = UIButton(frame: CGRect(x: 0, y: 0, width: 30, height: 30)) backButton.setBackgroundImage(UIImage(named: "img"), for: .normal) backButton.addTarget(self, action: "action:", for: .touchUpInside) self.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: backButton)

Why is my map view callout translucent/transparent and how do I change it's color?

 ̄綄美尐妖づ 提交于 2019-12-30 08:13:47
问题 I'm on iOS 7 and I have the following problem. I can't find a clue after some research curiously... I have a map view annotation with left and right accessories but transparent in the middle (default iOS 7 behavior I think). How to change the default translucent/transparent background to any other color I want? 回答1: Is your MKMapView inside a UITableViewCell ? I had a similar issue, where the UITableViewCellSelectionStyle of the cell caused this visual glitch. Setting it to

Give a top inset to UIRefreshControl

孤者浪人 提交于 2019-12-30 08:02:20
问题 I use an UIRefreshControl like it (without an UITableViewController) : UIRefreshControl *refreshControl = [UIRefreshControl new]; [refreshControl addTarget:self action:@selector(viewDidBeginRefreshing:) forControlEvents:UIControlEventValueChanged]; [self.table addSubview:refreshControl]; Problem is the refresh wheel is positioned below the UINavigationController's translucent bar (ios7). There is only a few topic on this problem on StackOverflow. And they didn't bring any valuable solution to