Hello everyone!
I want to achieve a similar "Bouncing Church" Some effects of terrain destruction, I am using opengl es1.1, I used during this period numerous integration, mask, masks, pixel logic operations, to no avail including experimented glTexSubImage, but also unable to achieve the desired effect, only in the solid figure achieved, but the color chart can not be achieved, the request experts to give us, thank you!
Reply:
It seems that the world is really very cold, even a technology are reluctant to share their own solution!
Saturday, September 28, 2013
NSHomeDirectory () Why return to the directory is / var / ....
The simulator is Users, but in the real machine into var, Why? Real machine is iOS6
Reply:
This is nothing strange, real machine directory structure with the desktop environment is not the same
Reply:
It returns, loaded containers of this package
Real machine is a mobile phone / iPad / ipod touch inside position. . .
Simulator is a computer location. . .
Apart from the beginning is not the same, but both are the same after half
Reply:
This is nothing strange, real machine directory structure with the desktop environment is not the same
Reply:
It returns, loaded containers of this package
Real machine is a mobile phone / iPad / ipod touch inside position. . .
Simulator is a computer location. . .
Apart from the beginning is not the same, but both are the same after half
xcode4.4 discovery started the project can not be opened
Yesterday, I started to open xcode4.4 discovery project can not be opened, just in the middle of the circle shows the loading stop turn ah ah. . . high cpu usage, it has been so stuck unable to respond. My online search, I found a man also experienced similar problems, saying that loads when xcode started before the final project, when that project is destroyed will be loaded error happens, say you want to delete startup files , the file path is as follows: "/ Users / goodmonypaul / Library / Autosave Information / Unsave ****", but my brother just contact mac systems and xcode, can not find the path. Will you have encountered this problem do? How to solve?
Reply:
Brothers Hello:
1 Open Terminal Terminal.
2. Cd ~ / Libarary / Autosave \ Information
3. Rm-rf Unsaved \ Xcode *
You can, leave a message in question
Reply:
Problem solved, thank you. Really delete files beginning even a Unsaved enough.
Reply:
Studied. I also rarely use the mac,
Reply:
Have not yet encountered, perhaps later be useful. .
Reply:
Brothers Hello:
1 Open Terminal Terminal.
2. Cd ~ / Libarary / Autosave \ Information
3. Rm-rf Unsaved \ Xcode *
You can, leave a message in question
Reply:
Problem solved, thank you. Really delete files beginning even a Unsaved enough.
Reply:
Studied. I also rarely use the mac,
Reply:
Have not yet encountered, perhaps later be useful. .
Xcode cannot run using the selected device. How to solve
Xcode cannot run using the selected device.
Choose a destination with a supported architecture in order to run on this device.
From the Internet to find a lot of ways to solve, but will not work.
Certificate is no problem,
iOS Deployment Target and Deployment Target are set too.
. . . . With a lot of ways. Is not. . .
Help. .
Choose a destination with a supported architecture in order to run on this device.
From the Internet to find a lot of ways to solve, but will not work.
Certificate is no problem,
iOS Deployment Target and Deployment Target are set too.
. . . . With a lot of ways. Is not. . .
Help. .
IPhone3 simulator with stropng and UIwindow Why go wrong
Recent off-campus training IOS, put in the engine room simulator used IPhone5 Kaodao IPhone3 simulator code running back, there will be strong and UIwindow errors, etc., how to modify? New to understand, the Supreme explain.
Reply:
1 Check the next version. xcode whether it is supported by ARC version because strong statements are generally supported by ARC version (not used ARC, just know that the ARC have Strong, the underlying logic has __stong)
2. Equipment problem, because many of ios api, are available from ios4.0 began. Look at your device's system version. Recommends upgrading to 5.0, 6.0 to see the situation (because 6.0 is not suitable for beginners to learn, add a lot of api)
Reply:
1 Check the next version. xcode whether it is supported by ARC version because strong statements are generally supported by ARC version (not used ARC, just know that the ARC have Strong, the underlying logic has __stong)
2. Equipment problem, because many of ios api, are available from ios4.0 began. Look at your device's system version. Recommends upgrading to 5.0, 6.0 to see the situation (because 6.0 is not suitable for beginners to learn, add a lot of api)
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:' NSBundle (loaded) 'with name' Comcell''
If that
Customize a uitableviewcell
How it can be added to a uitableview
as cell
Thank you
Reply:
- (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath
{
static NSString * CellIdentifier = @ "merge Second Cell";
ILSCMMergeSecondCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];
if (cell == nil) {
cell = [[[ILSCMMergeSecondCell alloc] initWithStyle: UITableViewCellStyleValue1 reuseIdentifier: CellIdentifier] autorelease];
}
/ / Configure the cell ...
}
This code ILSCMMergeSecondCell as a custom cell.
Reply:
My custom cell's name is ComCell.xib, identifier for the ComCell
Then as you said, my code
static NSString * CellIdentifier = @ "ComCell";
ComCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];
if (cell == nil) {
cell = [[[ComCell alloc] initWithStyle: UITableViewCellStyleValue1 reuseIdentifier: CellIdentifier] autorelease];
}
However, did not show up?
Reply:
My method:
static NSString * CellIdentifier = @ "ComCellIdentifier";
BOOL nibRegistered = NO;
if (! nibRegistered) {
UINib * nib = [UINib nibWithNibName: @ "Comcell" bundle: nil];
[TableView registerNib: nib forCellReuseIdentifier: CellIdentifier];
nibRegistered = YES;
}
ComCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];
Why always ComCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier]; sentence
Error
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:' NSBundle (loaded) 'with name' Comcell''
Reply:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:' NSBundle (loaded) 'with name' Comcell''
I do not XIB, direct code construct UI. . . . Background PNG images posted Zhang, facing tune coordinate wow
You above error is to say, can not you read in the default bundle hungry XIB file. . . NIB is XIB.
bundle is your app built path
Reply:
The company said without considering compatibility, so we do not xib, and directly in the storyboard to write
But would like to ask, where is that NibName defined?
NibName is the file name? Let's say MyNib.xib it NibName is not that MyNib?
Reply:
html ios layout layout also seems more than strange!
I storyboard in uitableviewcell added a view
How to set its height?
Why my settings
CGRect transmitViewBounds = CGRectMake (0, 0, 270, 100);
[Cell.subView setBounds: transmitViewBounds];
In just loaded does not work, but then included in the draw when there is effect, but the effect is randomly appear in a cell on
Is how else ah?
Customize a uitableviewcell
How it can be added to a uitableview
as cell
Thank you
Reply:
- (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath
{
static NSString * CellIdentifier = @ "merge Second Cell";
ILSCMMergeSecondCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];
if (cell == nil) {
cell = [[[ILSCMMergeSecondCell alloc] initWithStyle: UITableViewCellStyleValue1 reuseIdentifier: CellIdentifier] autorelease];
}
/ / Configure the cell ...
}
This code ILSCMMergeSecondCell as a custom cell.
Reply:
My custom cell's name is ComCell.xib, identifier for the ComCell
Then as you said, my code
static NSString * CellIdentifier = @ "ComCell";
ComCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];
if (cell == nil) {
cell = [[[ComCell alloc] initWithStyle: UITableViewCellStyleValue1 reuseIdentifier: CellIdentifier] autorelease];
}
However, did not show up?
Reply:
My method:
static NSString * CellIdentifier = @ "ComCellIdentifier";
BOOL nibRegistered = NO;
if (! nibRegistered) {
UINib * nib = [UINib nibWithNibName: @ "Comcell" bundle: nil];
[TableView registerNib: nib forCellReuseIdentifier: CellIdentifier];
nibRegistered = YES;
}
ComCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];
Why always ComCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier]; sentence
Error
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:' NSBundle (loaded) 'with name' Comcell''
Reply:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle:' NSBundle (loaded) 'with name' Comcell''
I do not XIB, direct code construct UI. . . . Background PNG images posted Zhang, facing tune coordinate wow
You above error is to say, can not you read in the default bundle hungry XIB file. . . NIB is XIB.
bundle is your app built path
Reply:
The company said without considering compatibility, so we do not xib, and directly in the storyboard to write
But would like to ask, where is that NibName defined?
NibName is the file name? Let's say MyNib.xib it NibName is not that MyNib?
Reply:
html ios layout layout also seems more than strange!
I storyboard in uitableviewcell added a view
How to set its height?
Why my settings
CGRect transmitViewBounds = CGRectMake (0, 0, 270, 100);
[Cell.subView setBounds: transmitViewBounds];
In just loaded does not work, but then included in the draw when there is effect, but the effect is randomly appear in a cell on
Is how else ah?
Novice questions about issues of Exception
posts by z550946941 on 2012-12-20 16:33:01 Edit
This is a book about Objective-c example, using CodeBlocks compile and run, the following error: Uncaught exception NSInvalidArgumentException, reason: NSAutoreleasePool (instance) does not recognize length
You look great God and what is wrong with
Code is as follows:
# Import
/ / ----------------------------------------
@ Interface Tire: NSObject
@ End / / Tire
@ Implementation Tire
- (NSString *) description {
return (@ "I am a tire. I last a while.");
} / / Description
@ End / / Tire
/ / ----------------------------------------
@ Interface AllWeatherRadial: Tire
@ End / / AllWeatherRadial
@ Implementation AllWeatherRadial
- (NSString *) description {
return (@ "i am a tire for rain or shine.");
}
@ End
/ / ----------------------------------------
@ Interface Engine: NSObject
@ End / / Engine
@ Implementation Engine
- (NSString *) description {
return (@ "I am an engine, Vrooom!");
} / / Description
@ End / / Engine
/ / ----------------------------------------
@ Interface Slant6: Engine
@ End / / Slant6
@ Implementation Slant6
- (NSString *) description {
NSLog (@ "I am a slant-6. VROOOM!");
}
@ End / / Slant6
/ / ----------------------------------------
@ Interface Car: NSObject {
Engine * engine;
Tire * tires [4];
}
- (Engine *) engine;
- (Void) setEngine: (Engine *) newEngine;
- (Tire *) tireAtIndex: (int) index;
- (Void) setTire: (Tire *) tire atIndex: (int) index;
- (Void) print;
@ End / / Car
@ Implementation Car
- (Id) init {
if (self == [super init]) {
engine = [Engine new];
tires [0] = [Tire new];
tires [1] = [Tire new];
tires [2] = [Tire new];
tires [3] = [Tire new];
}
return self;
}
- (Engine *) engine {
return engine;
}
- (Void) setEngine: (Engine *) newEngine {
engine = newEngine;
}
- (Tire *) tireAtIndex: (int) index {
if (index <0 | | index> 3) {
NSLog (@ "bad index (% d) in tireAtIndex", index);
exit (1);
}
return tires [index];
}
- (Void) setTire: (Tire *) tire atIndex: (int) index {
if (index <0 | | index> 3) {
NSLog (@ "bad index (% d) in setTire: atIndex", index);
exit (1);
}
tires [index] = tire;
}
- (Void) print {
NSLog (@ "% @", engine);
NSLog (@ "% @", tires [0]);
NSLog (@ "% @", tires [1]);
NSLog (@ "% @", tires [2]);
NSLog (@ "% @", tires [3]);
}
@ End / / Car
/ / ------------------------------------------------ -
int main (int argc, const char * argv []) {
Car * car = [Car new];
/ / Engine * engine = [Engine new];
Slant6 * slant6 = [Slant6 new];
[Car setEngine: slant6];
int i;
for (i = 0; i <4; i + +) {
/ / Tire * tire = [Tire new];
Tire * tire = [AllWeatherRadial new];
[Car setTire: tire atIndex: i];
}
car.print;
return 0;
}
Reply:
Breakpoints Bubble Look, look where the problem
Reply:
Thank you reply that he put a piece of code was wrong, had the return, I NSLog print directly, no return, that is, the following code
@ interface Slant6: Engine
@ End / / Slant6
@ Implementation Slant6
- (NSString *) description {
NSLog (@ "I am a slant-6. VROOOM!");
}
@ End / / Slant6
Reply:
Right, so many breakpoints, what can come out of this problem.
Subscribe to:
Posts (Atom)