objective-c

TableView with inset grouped style: Have rounded corners even with hidden cells

穿精又带淫゛_ 提交于 2021-02-11 15:38:55
问题 I have a table of the type inset grouped style. Depending on some selections I want to hide some cells by reducing their height to 0. Now is there anyway to still show rounded corners even if the respective cell has height 0? Or how would you do that? I don't want to "delete" the cell, otherwise it is much more complex to keep track of the cells for me. 来源: https://stackoverflow.com/questions/61502471/tableview-with-inset-grouped-style-have-rounded-corners-even-with-hidden-cells

adding images to app bundle permanently

蓝咒 提交于 2021-02-11 15:17:52
问题 I am adding some images that I need to use in my app in Supporting Files folder(Xcode 4.3). But when I transfer that code to some other machine(like to my supervisor) those images are not available as in I have only their names displayed in red color in that list. How can I add them permanently? 回答1: In the add files windows, and after you select the images, make sure that distination check box is selected, this check box indicate whether you want to copy the selected items into distention

Detecting private APIs in iOS application

*爱你&永不变心* 提交于 2021-02-11 15:14:18
问题 I have used AppScanner detects private APIs But, it is detecting almost all function signatures as private APIs with 50% likelihood . Are these false warnings ? I agree _font clashes with internal API but why are remaining public APIs being shown in list ? 回答1: Apparently the program is dead. Check the site at http://www.chimpstudios.com/appscanner/index.html It probably did work well at some point in the past. 来源: https://stackoverflow.com/questions/10898824/detecting-private-apis-in-ios

Does Cache Directory gets deleted when upgrading iOS?

我与影子孤独终老i 提交于 2021-02-11 15:01:34
问题 I would like to know whether the Cache directory gets deleted when upgrading iOS? 回答1: There are no clear answer for this in the documentation. It can be purged when the device gets low on disk space or performing a full restoration. Application_Home/Library/Caches Use this directory to write any application-specific support files that you want to persist between launches of the application or during application updates. Your application is generally responsible for adding and removing these

How can I modify this SRT file parser?

一曲冷凌霜 提交于 2021-02-11 14:41:42
问题 I found some good code for parsing .srt files on stackoverflow (Parsing SRT file with Objective C) shown below: NSScanner *scanner = [NSScanner scannerWithString:[theTextView string]]; while (![scanner isAtEnd]) { @autoreleasepool { NSString *indexString; (void) [scanner scanUpToCharactersFromSet:[NSCharacterSet newlineCharacterSet] intoString:&indexString]; NSString *startString; (void) [scanner scanUpToString:@" --> " intoString:&startString]; (void) [scanner scanString:@"-->" intoString

HealthKit running distance does not add up correctly?

∥☆過路亽.° 提交于 2021-02-11 14:21:52
问题 If I use Apple Health Kit to fetch the route data for a given running workout, and add up distance between each sample, it does not match up with the Health App total distance. I don't understand why. Please check the blow simplified test code. Only thing I can think of, is that I don't take pauses and GPS dropouts into account in the code below - but this should make the computed distance longer, I think. I have workouts where the computed distance is 50-100 meters short (10km workout, no

swift error: Use of 'centralManager' refers to instance method rather than var 'centralManager' in module

醉酒当歌 提交于 2021-02-11 13:10:17
问题 I have an Obj-C app that imports an Obj-C static lib which contains a .swift file with func run_central(). I can't get the app to reference run_central() and get the build error. Here is Obj-C app project and its imported Obj-C static library Hub_lib that also contains (ie. imports) the .swift file.... ObjC app project has this file........ ViewController.mm ..................... (is .mm because it imports C++ lib) . . . - (IBAction)run_simple_central:(id)sender { Hub_lib* hub_lib = [Hub_lib

swift error: Use of 'centralManager' refers to instance method rather than var 'centralManager' in module

混江龙づ霸主 提交于 2021-02-11 13:07:09
问题 I have an Obj-C app that imports an Obj-C static lib which contains a .swift file with func run_central(). I can't get the app to reference run_central() and get the build error. Here is Obj-C app project and its imported Obj-C static library Hub_lib that also contains (ie. imports) the .swift file.... ObjC app project has this file........ ViewController.mm ..................... (is .mm because it imports C++ lib) . . . - (IBAction)run_simple_central:(id)sender { Hub_lib* hub_lib = [Hub_lib

iOS Core Data - Serious application error - attempt to insert nil - in less than 1%

柔情痞子 提交于 2021-02-11 12:33:38
问题 iOS Core Data - Serious application error - attempt to insert nil Hello, My app runs actualy stable, but in seldom cases it crashes with this error message... 2019-04-02 20:48:52.437172+0200 myAppName[4422:1595677] [error] error: Serious application error. Exception was caught during Core Data change processing. This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification. -[__NSCFSet addObject:]: attempt to insert nil with userInfo (null) CoreData: error:

How can I get title, and description of website without using UIWebView?

随声附和 提交于 2021-02-11 12:29:20
问题 I want to make URL preview, such as in this picture - So, I get image of website using google favicons. But I don't understand how can I get the title and description of the web-page. I know a good library URLEmbeddedView and it works great!. But I want to write my own. I found many similar questions on stackoverflow, but there are no answers that describe how to get website title without UIWebView . 回答1: Using stock API, you can do the following: - (void)getSiteHtml { NSURLSession *session =